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:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user