You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Receiving a JSON error response from a service in JsonModel.response, the
'detail' attribute passed into HttpError is the result of loading the 'error'
value in the JSON object, which is also an object/dict and so can't be returned
from __str__.
I get '<unprintable HttpError>' in tracebacks, which is unhelpful for debugging.
I am not sure what the best way to fix this is, but one possibility is to just
pass the status and reason into the HttpError in the same way that it is
handled for non application/json errors. I can prepare a fix/patch to do it
like this unless someone else has overriding thoughts?
Original issue reported on code.google.com by afs...@google.com on 15 Dec 2010 at 2:56
The text was updated successfully, but these errors were encountered:
I have written a patch here that might be a good start:
http://code.google.com/r/afshar-json-errorhandling/
1. Moves the display logic out of the model into the error.
2. Add some tests
Original comment by afs...@google.com on 16 Dec 2010 at 9:25
Original issue reported on code.google.com by
afs...@google.com
on 15 Dec 2010 at 2:56The text was updated successfully, but these errors were encountered: