diff --git a/lib/rapi/client.py b/lib/rapi/client.py index 298640e085b0b94443f95826590d26d24340d690..262e3893e9b77732c62d271f1bcbcfe090163b89 100644 --- a/lib/rapi/client.py +++ b/lib/rapi/client.py @@ -419,6 +419,8 @@ class GanetiRapiClient(object): encoded_response_content = resp.read() except (OpenSSL.SSL.Error, OpenSSL.crypto.Error), err: raise CertificateError("SSL issue: %s (%r)" % (err, err)) + except urllib2.HTTPError, err: + raise GanetiApiError(str(err), code=err.code) if encoded_response_content: response_content = simplejson.loads(encoded_response_content)