add an OverlordAPIError
This commit is contained in:
@@ -53,14 +53,23 @@ class RequestedObjectNotFoundError(errors.NotFound):
|
|||||||
self.details = details
|
self.details = details
|
||||||
|
|
||||||
|
|
||||||
class HeartbeatError(errors.RESTError):
|
class OverlordAPIError(errors.RESTError):
|
||||||
|
"""Error raised when a call to the agent API fails."""
|
||||||
|
|
||||||
|
message = 'Error in call to teeth-agent-api.'
|
||||||
|
|
||||||
|
def __init__(self, details):
|
||||||
|
super(OverlordAPIError, self).__init__(details)
|
||||||
|
self.details = details
|
||||||
|
|
||||||
|
|
||||||
|
class HeartbeatError(OverlordAPIError):
|
||||||
"""Error raised when a heartbeat to the agent API fails."""
|
"""Error raised when a heartbeat to the agent API fails."""
|
||||||
|
|
||||||
message = 'Error heartbeating to agent API.'
|
message = 'Error heartbeating to agent API.'
|
||||||
|
|
||||||
def __init__(self, details):
|
def __init__(self, details):
|
||||||
super(HeartbeatError, self).__init__()
|
super(HeartbeatError, self).__init__(details)
|
||||||
self.details = details
|
|
||||||
|
|
||||||
|
|
||||||
class ImageDownloadError(errors.RESTError):
|
class ImageDownloadError(errors.RESTError):
|
||||||
|
Reference in New Issue
Block a user