Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#894 closed defect (fixed)

[patch] Catch exceptions in response middleware

Reported by: sune.kirkeby@… Owned by: adrian
Component: Core (Other) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Exceptions thrown in response middlewares are not caught by the normal exception handlers,
because the response-middlewares are applied outside get_response. It would be nice if
the exceptions were caught, and nicely formatted like normal exceptions :)

Attachments (1)

response-middleware-error.patch (1.6 KB) - added by sune.kirkeby@… 9 years ago.

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by sune.kirkeby@…

comment:1 Changed 9 years ago by sune.kirkeby@…

Patch attched; but I am wondering if the response middlewares should be applied just after the
view-function, so exception-middlewares see exceptions from them too?

comment:2 Changed 9 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [2358]) Fixed #894 -- Moved response middleware call to base.py so that exceptions in that middleware get processed by the standard exception handling. As a nice side effect, this cuts down on a bit of redundant code.

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