Opened 7 years ago

Closed 13 months ago

#6992 closed Cleanup/optimization (fixed)

Better error message if Middleware.process_response returns None

Reported by: guettli Owned by: nobody
Component: Core (Other) Version: master
Severity: Normal Keywords:
Cc: hv@… Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

It is easy to forget the return statement in process_response(). This
little patch results in a better error message.

Attachments (1)

6992.diff (701 bytes) - added by guettli 7 years ago.

Download all attachments as: .zip

Change History (8)

Changed 7 years ago by guettli

comment:1 Changed 7 years ago by telenieko

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 6 years ago by SmileyChris

  • Patch needs improvement set

Error message is a wee bit confusing (and is the wsgi handler isn't the only place where this is needed - maybe a small refactor would be good).

comment:3 Changed 4 years ago by julien

  • Severity set to Normal
  • Type set to Cleanup/optimization

comment:4 Changed 3 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:5 Changed 3 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:6 Changed 13 months ago by aaugustin

  • Has patch unset
  • Patch needs improvement unset
  • Triage Stage changed from Accepted to Ready for checkin

PR: https://github.com/django/django/pull/2774

It's quite simple but I'll wait for the CI to run the test suite.

comment:7 Changed 13 months ago by Aymeric Augustin <aymeric.augustin@…>

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

In 47a9347b9828ed0186d676ee0c5cadd9e6a93edb:

Fixed #6992 -- Improved error when middleware omits HttpResponse.

Thanks guettli for the report.

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