fix: preserve HTTPException status in update_docling_preset (#1586)#2004
fix: preserve HTTPException status in update_docling_preset (#1586)#2004hunterxtang wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughException handling in ChangesHTTPException preservation fix
Estimated code review effort: 1 (Trivial) | ~5 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant update_docling_preset
participant Logger
Client->>update_docling_preset: request with invalid preset
update_docling_preset->>update_docling_preset: raise HTTPException(400)
update_docling_preset->>update_docling_preset: catch HTTPException, re-raise
update_docling_preset-->>Client: HTTPException(400)
Client->>update_docling_preset: request causing generic exception
update_docling_preset->>Logger: log error
update_docling_preset-->>Client: HTTPException(500, fixed detail)
Related issues: Suggested labels: bug, tests Suggested reviewers: edwinjosechittilappilly 🐰 A preset gone wrong, once lost in the fray, 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes #1586. Re-lands the fix from #1922 (merged into release-0.5.1) on a branch pushed directly to this repo, so CI has access to the secrets forked PRs can't use — see #1814 for why the forked version's E2E checks could never pass. Applied by hand rather than cherry-picked because src/api/settings.py has since been split into the src/api/settings/ package on main; the endpoint change now lives in src/api/settings/endpoints.py. Includes a unit regression test asserting an invalid preset returns 400, not 500.
Summary by CodeRabbit