Parse exceptions from openstacksdk
When parsing exceptions from openstacksdk, exc.details is desired to contain error message, but sometimes error may exist in exc.message. Openstacksdk's HttpException has __str__ method to handle error message, so in senlinclient HttpException object can show the right error message. Change-Id: I9246ed3d47151ebb8e03cd13134d58749cd35785 Closes-bug: #1541217
This commit is contained in:
@@ -240,7 +240,7 @@ def parse_exception(exc):
|
||||
record = {
|
||||
'error': {
|
||||
'code': exc.http_status,
|
||||
'message': exc.details,
|
||||
'message': exc,
|
||||
}
|
||||
}
|
||||
elif isinstance(exc, reqexc.RequestException):
|
||||
|
||||
Reference in New Issue
Block a user