#2036: TG gives 500 server error instead of 403 or 404
-------------------------------------------------------+--------------------
Reporter: chrisz | Owner: faide
Type: defect | Status: new
Priority: normal | Milestone: 1.1
Component: TurboGears | Version: 1.0.7
Severity: minor | Resolution:
Keywords: JSON, NoApplicableMethods, SecureResource |
-------------------------------------------------------+--------------------
Comment (by chrisz):
My current fix for tbe "500 instead of 403" problem is to add
`allow_json=True` to the login controller, and then the following just
before the method returns:
{{{
if request.params.get('tg_format'):
# JSON or anything different from HTML
raise HTTPError(403)
}}}
A good fix for the "500 instead of 404" problem is still wanted.
--
Ticket URL: <http://trac.turbogears.org/ticket/2036#comment:3>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---