mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
fastdns: fixed how exceptions are handled in _request
This commit is contained in:
@@ -51,8 +51,9 @@ class AkamaiClient(object):
|
||||
url = urljoin(self.base, path)
|
||||
resp = self._sess.request(method, url, params=params, json=data)
|
||||
|
||||
if resp.status_code > 299:
|
||||
raise AkamaiClientException(resp)
|
||||
if resp.status_code == 404:
|
||||
raise AkamaiClientNotFound(resp)
|
||||
resp.raise_for_status()
|
||||
|
||||
return resp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user