1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

fastdns: refactored AkamaiClientNotFound exception class

This commit is contained in:
Basir
2019-07-29 13:03:23 -04:00
parent 41a5d78728
commit a85d4e25ed

View File

@@ -15,19 +15,10 @@ from ..record import Record
from .base import BaseProvider
class AkamaiClientException(Exception):
_errorMessages = {
404: "404: Resource not found"
}
class AkamaiClientNotFound(Exception):
def __init__(self, resp):
try:
message = self._errorMessages[resp.status_code]
except KeyError:
resp.raise_for_status()
message = "404: Resource not found"
super(AkamaiClientException, self).__init__(message)