BaseHandler does not handle resolver returning None
|Reported by:||xerolas||Owned by:||ccahoon|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
django.core.handler.base.BaseHandler has the following call to the resolver:
callback, callback_args, callback_kwargs = resolver.resolve( request.path_info)
However resolve() can return None (this happens to me when I get bogus HTTP requests from bots) and TypeError is not explicitly caught (for trying to unpack None).
The result is that 500 is returned instead of 404 and an email to the admins is sent (by default).
Change History (21)
comment:1 Changed 8 years ago by
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Accepted|