1
0
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:
Basir
2019-07-29 13:07:04 -04:00
parent a85d4e25ed
commit 93e1e0939d

View File

@@ -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