Commit 3331dd7
committed
fix: Prevent fallback to 400 errors when linting fails
🔧 Core Issue Resolution:
- Changed exception handling in linting stage to return 200 OK instead of continuing processing
- When linting service fails (e.g., PDF generation issues), return JSON error response with 200 status
- Prevents fallback to normal template processing that results in 400 Bad Request errors
📋 Changes:
- Modified exception handler to return JSONResponse with 200 status on linting failures
- Added detailed error logging with traceback for debugging
- Ensures file cleanup on linting service errors
- Provides clear error message indicating likely template validation issues
✅ Expected Behavior:
- Template validation errors: 200 OK with PDF error report
- Linting service errors: 200 OK with JSON error message
- No more 400 Bad Request responses for template validation issues1 parent 6f8c3f2 commit 3331dd7
1 file changed
+20
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
938 | 938 | | |
939 | 939 | | |
940 | 940 | | |
941 | | - | |
942 | | - | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
943 | 961 | | |
944 | 962 | | |
945 | 963 | | |
| |||
0 commit comments