[dashboard] UI fails to report 400 api errors on malformed packages
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Murano |
Fix Released
|
Medium
|
Unassigned |
Bug Description
To reproduce:
create a package like this `zip foo.zip *` (NOTE: no -r switch, so the directories inside archive are empty) and upload it.
dashboard would consider the package valid and pass it on to api, which it turn would return 400 (after raising PackageClassLoa
dashboard (or api) seem to treat this kind of 400 and 500 errors differently, after 500 exception.details contains html-string of the body of 500 response, while after 400 it contains a json-string with stacktrace and error description. It would be nice to unify this kind of behaviour.
On a side not it is also very likely that exception handling code from dashboard would break after translating, as it converts the body of the 500 response to str() which might cause problems after translation.
Changed in murano: | |
milestone: | none → kilo-3 |
status: | New → Fix Committed |
status: | Fix Committed → Confirmed |
Changed in murano: | |
milestone: | kilo-3 → kilo-rc1 |
Changed in murano: | |
status: | Fix Committed → Fix Released |
Changed in murano: | |
milestone: | kilo-rc1 → 2015.1.0 |
I don't understand - what do you consider as the bug in situation with the package?
On 500 vs other codes error handling - this makes sense, because when server completely gets down, it might not return JSON, it might return anything - so it is reasonable to pass this directly as an output.
By the way - Horizon has some configuration options to define how different exceptions must be handled: /github. com/openstack/ horizon/ blob/f112869e8b 18d3c0835e75c97 76b084a2fd2ca1b /openstack_ dashboard/ settings. py#L67- 67
https:/