You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by "Miguel Caballer (JIRA)" <ji...@apache.org> on 2017/06/19 11:30:00 UTC
[jira] [Created] (LIBCLOUD-925) Error in GCE driver in function
_get_error
Miguel Caballer created LIBCLOUD-925:
----------------------------------------
Summary: Error in GCE driver in function _get_error
Key: LIBCLOUD-925
URL: https://issues.apache.org/jira/browse/LIBCLOUD-925
Project: Libcloud
Issue Type: Bug
Reporter: Miguel Caballer
Priority: Minor
_get_error function assumes that the body['error'] value is a dict, but in some cases it contains an string (unicode).
So it tries to do a err.get and it failts.
I has to be something like that:
if 'code' in err:
code = err.get('code')
message = err.get('message')
else:
code = None
if 'reason' in err:
code = err.get('reason')
message = body.get('error_description', err)
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)