fix: dispatch() error handler returns exc instead of response#8933
fix: dispatch() error handler returns exc instead of response#8933MinitJain wants to merge 1 commit intomakeplane:previewfrom
Conversation
All base view dispatch() methods were calling handle_exception(exc) to build a proper HTTP response but then returning the raw exception object instead of the computed response variable. Fix applied across all four base view files (app, api, license, space).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis pull request fixes a bug across four base view files where exception handlers were returning the raw exception object instead of the properly formatted HTTP response. The fix ensures all views consistently return DRF-compliant error responses with appropriate status codes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
Description
Fixes #8932
In all four base view files,
dispatch()callsself.handle_exception(exc)to build a proper HTTP response but then returns the raw Python exception object (exc) instead of theresponsevariable it just built.Six lines changed across four files — nothing else.
Type of Change
Test Scenarios
{"error": "The required object does not exist."}with status 404{"error": "Please provide valid detail"}with status 400References
Closes #8932
Summary by CodeRabbit