2016-09-10 08:14:40 +00:00
|
|
|
class BaseError(RuntimeError):
|
|
|
|
def __init__(self, message='Unknown error', extra_fields=None):
|
|
|
|
super().__init__(message)
|
|
|
|
self.extra_fields = extra_fields
|
|
|
|
|
|
|
|
|
|
|
|
class ConfigError(BaseError):
|
2016-08-14 12:22:53 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2016-09-10 08:14:40 +00:00
|
|
|
class AuthError(BaseError):
|
2016-08-14 12:22:53 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2016-09-10 08:14:40 +00:00
|
|
|
class IntegrityError(BaseError):
|
2016-08-14 12:22:53 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2016-09-10 08:14:40 +00:00
|
|
|
class ValidationError(BaseError):
|
2016-08-14 12:22:53 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2016-09-10 08:14:40 +00:00
|
|
|
class SearchError(BaseError):
|
2016-08-14 12:22:53 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2016-09-10 08:14:40 +00:00
|
|
|
class NotFoundError(BaseError):
|
2016-08-14 12:22:53 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
2016-09-10 08:14:40 +00:00
|
|
|
class ProcessingError(BaseError):
|
2016-08-14 12:22:53 +00:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class MissingRequiredFileError(ValidationError):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class MissingRequiredParameterError(ValidationError):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class InvalidParameterError(ValidationError):
|
|
|
|
pass
|