From 52ce0b205e336d7545947a13b4a4f3dfc490d51e Mon Sep 17 00:00:00 2001 From: Russell Sim Date: Thu, 7 Nov 2013 11:28:05 +1100 Subject: When there is no error body return the HTTP reason Return the response reason when there is no message body to return. DocImpact Change-Id: Ia60da4f04b059a13fcbe0059bb42fd77f272d8aa Closes-Bug: 1248773 --- cinderclient/exceptions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cinderclient/exceptions.py') diff --git a/cinderclient/exceptions.py b/cinderclient/exceptions.py index 1e3050c..104d8ab 100644 --- a/cinderclient/exceptions.py +++ b/cinderclient/exceptions.py @@ -172,4 +172,5 @@ def from_response(response, body): return cls(code=response.status_code, message=message, details=details, request_id=request_id) else: - return cls(code=response.status_code, request_id=request_id) + return cls(code=response.status_code, request_id=request_id, + message=response.reason) -- cgit v1.2.1