Roundup Tracker - Issues

Message5864

Author rouilj
Recipients ber, rouilj
Date 2016-07-17.03:15:15
Message-id <1468725317.08.0.491480502373.issue2550755@psf.upfronthosting.co.za>
In-reply-to
The reason the message doesn't show up is that NotFound is supposed to
generate a 404 response to the client. The template is changed to 404
in client.py and the _generic.404.html has no support for messages.

I have made two changes:

 1) The response_code is set to 400 before raising the NotFound
    error. 400 (Bad Request) indicates that there is a client side
    issue.  I.E. it fed a bogus column value to the server.

 2) client.py's NotFound handling is changed to look at the
    response_code and if it is not 400, the usual 404 response_path is
    taken. If the code is 400, the user is presented with the message
    formatted like it is formatted for SeriousError.

The documentation for the NotFound exception doesn't explain when it
should be used. Arguablly SeriousError is the right way to handle this
if NotFound is supposed to be a pure "404" error code.

Suprisingly asking for a non-existent class looks like it doesn't use
the 404 template. E.G. compare:

   http://issues.roundup-tracker.org/bug2550755 (not using template)
to

   http://issues.roundup-tracker.org/issue2550755776 (using the
     _generic.404.html template)

So Bern should this attached patch be committed?

-- rouilj
History
Date User Action Args
2016-07-17 03:15:17rouiljsetmessageid: <1468725317.08.0.491480502373.issue2550755@psf.upfronthosting.co.za>
2016-07-17 03:15:17rouiljsetrecipients: + rouilj, ber
2016-07-17 03:15:17rouiljlinkissue2550755 messages
2016-07-17 03:15:16rouiljcreate