Return json debug information message on exception inside a json exposed RestController method

Bug #1296064 reported by Moe Oslan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pecan
Invalid
Low
Unassigned

Bug Description

Reproduction:
- Set conf.app.debug = True
- Create a controller that extends the RestController
- Create a method inside this controller that is annotated with @expose('json')
- Raise an exception within this method
- Call this method via HTTP, e.g. curl

Expected Result:
- Json formatted debug information

Actual Result:
- HTML formatted debug information

Revision history for this message
Ryan Petrello (ryan-petrello) wrote :

Not sure I'd agree this is a bug, but it *is* a little confusing. In this circumstance, `app.conf.debug = True` causes the response body to be an HTML page with the rendered traceback (including some interactive Javascript for debugging the exception).

Changed in pecan:
importance: Undecided → Medium
importance: Medium → Low
Revision history for this message
Ryan Petrello (ryan-petrello) wrote :
Changed in pecan:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.