Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#10927 closed (fixed)

Content Types shortcut view throws 500s easily

Reported by: Jeremy Dunck Owned by: nobody
Component: Contrib apps Version: 1.1-beta
Severity: Keywords:
Cc: semente@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

BaseHandler.handle_uncaught_exception calls mail_admins any time an uncaught exception occurs. In my general usage, this is very rare.

The contenttypes.views.shortcut view, many arbitrary URLs will throw a 500. Since crawlers probe URL spaces, this leads to a lot of noise in error emails.

Attachments (2)

10927.diff (3.7 KB ) - added by Jeremy Dunck 15 years ago.
More robust shortcut view, with tests.
shortcut.diff (2.8 KB ) - added by Alex Gaynor 15 years ago.
simpler :)

Download all attachments as: .zip

Change History (10)

by Jeremy Dunck, 15 years ago

Attachment: 10927.diff added

More robust shortcut view, with tests.

comment:1 by Jeremy Dunck, 15 years ago

Has patch: set

comment:2 by Alex Gaynor, 15 years ago

Why does this raise a 404 if the PK isn't an integer? That's not the correct behavior as we support all sorts of other pks.

comment:3 by Alex Gaynor, 15 years ago

Err sorry, I misread the patch.

by Alex Gaynor, 15 years ago

Attachment: shortcut.diff added

simpler :)

comment:4 by Jeremy Dunck, 15 years ago

The simpler one probably works-for-me. I chose the .to_python route because that uniformly raises ValidationError-- I wasn't sure about the assumption that any cast in the ORM would fail as ValueError.

comment:5 by Chris Beaven, 15 years ago

Triage Stage: UnreviewedReady for checkin

Reviewed - looks good and the tests prove it works :)

comment:6 by Guilherme Gondim <semente@…>, 15 years ago

Cc: semente@… added

comment:7 by Luke Plant, 14 years ago

Resolution: fixed
Status: newclosed

(In [11917]) Fixed #10927 - Content Types shortcut view throws 500s instead of 404s

Thanks to Jeremy Dunck/Alex Gaynor for the patch

comment:8 by Luke Plant, 14 years ago

(In [11919]) [1.1.X] Fixed #10927 - Content Types shortcut view throws 500s instead of 404s

Thanks to Jeremy Dunck/Alex Gaynor for the patch

Backport of r11917 from trunk

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