API handlers are raising ValidationError, which is not an API exception
Bug #1394746 reported by
Julian Edwards
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Graham Binns |
Bug Description
Grep will find them all, but basically these should be coerced into a MAASAPIBadRequest instead. As it stands, ValidationError will cause a 500 to be returned to the client and a stack trace in the log.
Related branches
lp:~gmb/maas/fix-bug-1394746
- Gavin Panella (community): Approve
-
Diff: 713 lines (+138/-61)16 files modifiedsrc/maasserver/api/boot_resources.py (+2/-2)
src/maasserver/api/boot_source_selections.py (+3/-3)
src/maasserver/api/boot_sources.py (+3/-3)
src/maasserver/api/license_keys.py (+3/-3)
src/maasserver/api/maas.py (+2/-2)
src/maasserver/api/networks.py (+6/-6)
src/maasserver/api/node_group_interfaces.py (+3/-3)
src/maasserver/api/node_groups.py (+7/-7)
src/maasserver/api/nodes.py (+11/-13)
src/maasserver/api/ssh_keys.py (+2/-2)
src/maasserver/api/ssl_keys.py (+2/-2)
src/maasserver/api/tags.py (+5/-7)
src/maasserver/api/utils.py (+7/-5)
src/maasserver/api/zones.py (+3/-3)
src/maasserver/exceptions.py (+22/-0)
src/maasserver/tests/test_exceptions.py (+57/-0)
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → 1.7.1 |
tags: | added: api trivial |
Changed in maas: | |
assignee: | nobody → Graham Binns (gmb) |
status: | Triaged → In Progress |
Changed in maas: | |
milestone: | 1.7.1 → 1.7.2 |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | 1.7.2 → next |
Changed in maas: | |
status: | Fix Committed → Fix Released |
milestone: | next → none |
To post a comment you must log in.
Thanks for the fix ;)