MAAS doesn't have a consistent error response format in the API
Bug #1353495 reported by
Jason Hobbs
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Invalid
|
Low
|
Unassigned |
Bug Description
MAAS is good about returning HTTP Error codes in error conditions, but it lacks a consistent format for error message content or type. Some errors cause plain/text strings to be returned, some cause application/json strings to be returned, some have no content at all.
MAAS should have a consistent format, probably a json object, something like
{
errors: [{"message": "Frobnication failed.", "code": 42}]
}
This would allow API consumers to have generic error handling and reporting.
Also, this should be documented.
summary: |
- MAAS doesn't have a consistent error response format + [API] MAAS doesn't have a consistent error response format |
Changed in maas: | |
milestone: | none → 2.3.x |
importance: | Medium → High |
tags: | added: track |
Changed in maas: | |
status: | Invalid → New |
Changed in maas: | |
importance: | High → Low |
milestone: | 2.3.x → none |
status: | New → Triaged |
summary: |
- [API] MAAS doesn't have a consistent error response format + MAAS doesn't have a consistent error response format in the API |
To post a comment you must log in.
I have often thought the same thing. We need to return json exactly as you suggest I think.