"""Class to use for all API use errors.""" from artwork.constants import error from owsresponse import response class InvalidUsageException(Exception): """Exception to throw for all invalid usage errors.""" invalid_usage_response = response.create_error_response( code=error.ERROR_CODE_INVALID_USAGE, message=error.ERROR_MESSAGE_INVALID_USAGE, ) def __init__(self, response=invalid_usage_response): """Init InvalidUsageException class.""" Exception.__init__(self) self.response = response