Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#14523 closed (fixed)

Exceptions in response middleware aren't handled by main request's try .. except block

Reported by: Ivan Sagalaev Owned by: Ivan Sagalaev
Component: Core (Other) Version: 1.2
Severity: Keywords:
Cc: Mikhail Korobov Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The problem is solved by refactoring middleware application code out of wsgi.py and mod_python.py into base.py and shoving it before returning a response.

Attachments (1)

14523-review.diff (3.9 KB) - added by Ivan Sagalaev 6 years ago.
Patch for review only

Download all attachments as: .zip

Change History (6)

comment:1 Changed 6 years ago by Mikhail Korobov

Cc: Mikhail Korobov added

Changed 6 years ago by Ivan Sagalaev

Attachment: 14523-review.diff added

Patch for review only

comment:2 Changed 6 years ago by Ivan Sagalaev

Has patch: set

Added a patch to show what really should happen in this ticket. The patch is made on top of another one from #9886 and should not lay cleanly on trunk but it's perfectly suitable for a review.

comment:3 Changed 6 years ago by Russell Keith-Magee

Component: UncategorizedCore framework
milestone: 1.3
Triage Stage: UnreviewedReady for checkin

comment:4 Changed 6 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(In [14393]) Fixed #14523 -- Modified response handling so that exceptions raised by process_response() in a middleware are caught and handled like any other exception. Thanks to Ivan Sagalaev for the report and patch.

comment:5 Changed 5 years ago by Jacob

milestone: 1.3

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top