Source code for copr.v3.exceptions

from munch import Munch


[docs]class CoprException(Exception): """ Base Copr exception """ def __init__(self, msg=None, response=None): super(CoprException, self).__init__(msg) self.result = Munch(error=msg, __response__=response)
[docs]class CoprRequestException(CoprException): """ Raised when the API request doesn't proceed successfully """ pass
[docs]class CoprNoResultException(CoprException): """ Raised when no result data is returned """ pass
[docs]class CoprValidationException(CoprException): """ Raised when the data sent from client to API are not valid """ pass
[docs]class CoprNoConfigException(CoprException): """ Exception thrown when no config file is found """ pass
[docs]class CoprConfigException(CoprException): """ Exception thrown when the config file is incomplete or malformed. """ pass