#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 faide):
Maybe have a login handler that accepts JSON and if JSON is requied only
does one thing: return a predefined info like this pseudo-code:
{{{
return {auth_error:"You be logged in before doing %s" % previous_url}
}}}
The ajax caller would just need to scan ALL answers at all time to make
sure no auth_error is present in the payload and if so it should redirect
(js reload or such...) the browser to the login page by itself using HTML
instead of JSON.
--
Ticket URL: <http://trac.turbogears.org/ticket/2036#comment:1>
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
-~----------~----~----~----~------~----~------~--~---