Source code for zenpy.lib.exception

__author__ = 'facetoe'

[docs]class ZenpyException(Exception): """ A ``ZenpyException`` is raised for internal errors. """
[docs]class ZenpyCacheException(ZenpyException): """ A ``ZenpyCacheException`` is raised for errors relating the the :class:`ZenpyCache`. """
[docs]class RatelimitBudgetExceeded(ZenpyException): """ A ``RatelimitBudgetExceeded`` is raised when the ratelimit_budget has been spent. """
[docs]class APIException(Exception): """ An ``APIException`` is raised when the API rejects a query. """ def __init__(self, *args, **kwargs): self.response = kwargs.pop('response', None) super(APIException, self).__init__(*args)
[docs]class RecordNotFoundException(APIException): """ A ``RecordNotFoundException`` is raised when the API cannot find a record. """
[docs]class TooManyValuesException(APIException): """ A ``TooManyValuesException`` is raised when too many values have been passed to an endpoint. """