commit 87f0fb56b3977cc08693902a660420bdafcb5114
Author: Eva Balycheva <email address hidden>
Date: Tue Feb 16 23:51:10 2016 +0300
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.
Reviewed: https:/ /review. openstack. org/282114 /git.openstack. org/cgit/ openstack/ python- zaqarclient/ commit/ ?id=87f0fb56b39 77cc08693902a66 0420bdafcb5114
Committed: https:/
Submitter: Jenkins
Branch: master
commit 87f0fb56b3977cc 08693902a660420 bdafcb5114
Author: Eva Balycheva <email address hidden>
Date: Tue Feb 16 23:51:10 2016 +0300
Make TransportErrors more descriptive
Problems:
1. In some cases no information is provided for the CLI user when /github. com/openstack/ python- zaqarclient/ blob/master/ zaqarclient/ http.py# L30.
these exceptions are raised:
https:/
transport/
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 description format. TransportErrors can only show descriptions
title-
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: Ie2cc3081a5dd7c 4f21c29bdf78a9b ad76b515121