piston hijacks any TypeError raised by MAAS
Bug #1228205 reported by
Raphaël Badin
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Raphaël Badin |
Bug Description
When a TypeError is raised inside MAAS (indicative of a serious bug), piston hijacks it and returns a response with a 400 status code and a content that looks like this:
"""
Piston/0.2.3rc1 (Django 1.5.4) crash report:
Method signature does not match.
Resource does not expect any parameters.
"""
This is really suboptimal as it obscures the root cause of the error. Even with PISTON_
Related branches
lp:~rvb/maas/error-handler-bug-1228205
- Jeroen T. Vermeulen (community): Approve
-
Diff: 101 lines (+72/-1)2 files modifiedsrc/maasserver/api_support.py (+20/-1)
src/maasserver/tests/test_api_support.py (+52/-0)
tags: | added: api |
Changed in maas: | |
assignee: | nobody → Raphaël Badin (rvb) |
status: | Triaged → Fix Committed |
Changed in maas: | |
milestone: | none → 14.04 |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The culprit piston's error_handler() method in resource.py (/usr/share/ pyshared/ piston/ resource. py in the package). The docstring says it can be overridden. We should definitely do that and code up something more sensible (maybe replacing it with an empty method would be all that is needed).