python-zaqarclient/zaqarclient
Eva Balycheva 87f0fb56b3 Make TransportErrors more descriptive
Problems:

1. In some cases no information is provided for the CLI user when
these exceptions are raised:
https://github.com/openstack/python-zaqarclient/blob/master/zaqarclient/
transport/http.py#L30.
For example, try "openstack pool show unexisting_pool". You will see
just blank line. It is because the server returns no message in the 404
response body. And the user sees the blank line.

2. Most of the error responses from Zaqar have bodies in
title-description format. TransportErrors can only show descriptions
from these responses. It's better to include also titles in the
client's exception messages.

3. Some of the error responses from Zaqar are not in title-description
format, but still have some info in their bodies. It's better to include
this info to the client's exception message.

Solution:

This patch makes all exceptions in zaqarclient/transport/errors.py show
at least error response code. The patch TransportErrors properly gather
the info from Zaqar's error response bodies and show it.

Partial-Bug: 1542804

Change-Id: Ie2cc3081a5dd7c4f21c29bdf78a9bad76b515121
2016-03-01 00:43:53 +03:00
..
auth Add a way to create a signed URL from a queue 2016-01-20 15:32:45 +01:00
common Add support for flavor to the client library 2014-09-17 16:39:25 +02:00
queues Do not catch ConflictError on subscription create 2016-02-19 03:28:34 +03:00
tests Do not catch ConflictError on subscription create 2016-02-19 03:28:34 +03:00
transport Make TransportErrors more descriptive 2016-03-01 00:43:53 +03:00
__init__.py Rename Marconi to Zaqar 2014-08-04 16:55:10 +02:00
_i18n.py Drop use of 'oslo' namespace package 2015-05-06 19:48:36 +00:00
errors.py Added i18n support 2014-11-13 17:17:01 +01:00
version.py Rename Marconi to Zaqar 2014-08-04 16:55:10 +02:00