[docs]class CircleguardException(Exception):
"""Base class for exceptions in the circleguard program."""
[docs]class InvalidArgumentsException(CircleguardException):
"""Indicates an invalid argument was passed to one of the flags."""
[docs]class APIException(CircleguardException):
"""
Indicates an error involving the API, which may or may not be fatal.
UnknownAPIExceptions are considered fatal, InternalAPIExceptions are not.
"""
[docs]class NoInfoAvailableException(APIException):
"""Indicates that the API returned no information for the given arguments"""
[docs]class UnknownAPIException(APIException):
"""Indicates some error on the API's end that we were not prepared to handle."""
[docs]class InternalAPIException(APIException):
"""Indicates a response from the API that we know how to handle."""
[docs]class InvalidKeyException(InternalAPIException):
"""Indicates that an api key was rejected by the api."""
[docs]class RatelimitException(InternalAPIException):
"""Indicates that our key has been ratelimited and we should retry the request at a later date."""
[docs]class InvalidJSONException(InternalAPIException):
"""Indicates that the api returned an invalid json response, and we should retry the request."""
[docs]class ReplayUnavailableException(InternalAPIException):
"""Indicates that we expected a replay from the api but it was not able to deliver it."""