handler404 should accept 'exception'

RESOLVED FIXED

Status

RESOLVED FIXED
a year ago
a year ago

People

(Reporter: peterbe, Assigned: peterbe)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

a year ago
See https://irccloud.mozilla.com/pastebin/Wv5cWWsZ/

Basically, when you write your own, instead of django.views.defaults.page_not_found, you're supposed to accept an 'exception' second argument.
(Assignee)

Comment 2

a year ago
I'm not able to reproduce it. Even with DEBUG=False and running with Gunicorn. 

But the way Django 1.11.7 handles it, they're very gentle around handler404 functions that raise a TypeError. 
https://github.com/django/django/blob/1.11.7/django/core/handlers/exception.py#L110-L116

So I suspect NewRelic incorrectly scoops up this exception when it's supposed to be swallowed.

Updated

a year ago
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.