As an example: create a valid package zip, and import it with:
murano package-import ~/git/my-murano-apps/sjm.murano.test.zip Hippopotamus
Because, unfortunately, Hippopotamus is not a valid category, the server rejects the package with a 400 error. All the client see is:
INFO Starting new HTTP connection (1): 15.126.207.137
INFO Starting new HTTP connection (1): localhost
HTTPBadRequest (HTTP 400)
In a number of places the client code traps non-OK response codes and returns exceptions.from_response which creates HTTP exceptions from response codes. In the process it hides the body of the exception. The fix isn't as simple as passing 'response.content' to from_response, however, since the API is returning HTTP errors.
I think the right fix is to put some middleware on top of the request to return either XML or JSON-serialized exception messages (based on the content-type header or Accepts header of the request) - see heat/api/middleware/fault.py for an example.
After this, the client can show a useful error message, and the dashboard should be able to do similarly.
Exceptions should be reworked at the top level. The blueprint is created https:/ /blueprints. launchpad. net/murano/ +spec/muano- api-exception- handling