Return json debug information message on exception inside a json exposed RestController method
Bug #1296064 reported by
Moe Oslan
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
Changed in pecan: | |
importance: | Undecided → Medium |
importance: | Medium → Low |
To post a comment you must log in.
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).