Exceptions

General Exceptions

exception arya_api_framework.errors.FrameworkException

The core exception for all exceptions used in the API framework.

exception arya_api_framework.errors.ValidationError
This exception inherits from FrameworkException.

Raised when validating a variable’s type.

Extension Exceptions

exception arya_api_framework.errors.ExtensionError(message=None, *args, name)
This exception inherits from FrameworkException.

The base exception for errors related to extensions.

name

The extension that had an error.

Type

str

Attributes
exception arya_api_framework.errors.ExtensionNotFound(name)
This exception inherits from ExtensionError.

Raised when an extension is requested to be loaded, but it cannot be found.

Attributes
exception arya_api_framework.errors.ExtensionAlreadyLoaded(name)
This exception inherits from ExtensionError.

Raised when an extension that is being loaded has already been loaded.

Attributes
exception arya_api_framework.errors.ExtensionNotLoaded(name)
This exception inherits from ExtensionError.

Raised when an extension that is being unloaded is not currently loaded.

Attributes
exception arya_api_framework.errors.ExtensionEntryPointError(name)
This exception inherits from ExtensionError.

Raised when an extension is being loaded, but not setup entry point function was found.

Attributes
exception arya_api_framework.errors.ExtensionFailed(name, original)
This exception inherits from ExtensionError.

Raised when an extension fails to load during the module setup entry point function.

original

The original exception that was raised. This can also be found in the __cause__ attribute.

Type

Exception

Client Exceptions

exception arya_api_framework.errors.ClientError
This exception inherits from FrameworkException.

The parent exception for any client-specific errors.

exception arya_api_framework.errors.AsyncClientError
This exception inherits from ClientError.

The parent exception for any async client-specific errors.

exception arya_api_framework.errors.SyncClientError
This exception inherits from ClientError.

The parent exception for any sync client-specific errors.

SubClient Exceptions

exception arya_api_framework.errors.SubClientError(message=None, *args, name)
This exception inherits from ClientError.

The base exception for errors related to SubClients.

name

The SubClient that had an error.

Type

str

exception arya_api_framework.errors.SubClientAlreadyLoaded(name)
This exception inherits from SubClientError.

Raised when a SubClient that is being loaded has already been loaded.

exception arya_api_framework.errors.SubClientParentSet(name)
This exception inherits from SubClientAlreadyLoaded.

Raised when a SubClient that is being loaded already has a parent set, meaning it has been previously loaded.

exception arya_api_framework.errors.SubClientNotLoaded(name)
This exception inherits from SubClientError.

Raised when a SubClient that is being unloaded is not currently loaded.

Request Exceptions

exception arya_api_framework.errors.ResponseParseError(raw_response)
This exception inherits from ClientError.

The exception for failure to parse the response to request.

This is usually raised if the response body was not readable by json.loads().

raw_response

The raw response that was unable to be parsed.

Type

Union[str, bytes]

Attributes
exception arya_api_framework.errors.HTTPError(response)
This exception inherits from FrameworkException.

The base exception for any request errors.

See HTTP Status Codes for information about HTTP status codes.

status_code

The status code of the error.

Type

int

response

The response that was received that raised the error.

Type

Union[str, bytes, dict, list, BaseModel]

Attributes
exception arya_api_framework.errors.HTTPRedirect(response)
This exception inherits from HTTPError.

Raised for any 3xx Redirection responses.

These codes indicate that further action needs to be taken by the user in order to fulfill the request.

See 3xx Redirect for information about 3xx responses.

exception arya_api_framework.errors.HTTPClientError(response)
This exception inherits from HTTPError.

Raised for any 4xx Client Error responses.

These codes occur when an error has occurred as a result of the client application or user input, such as a malformed request.

See 4xx Client Error for information about 4xx responses.

exception arya_api_framework.errors.HTTPServerError(response)
This exception inherits from HTTPError.

Raised for any 5xx Server Error responses.

These codes occur when the server is aware that is has made an error, or is incapable of performing the request.

See 5xx Server Error for information about 5xx responses.

300 Errors

exception arya_api_framework.errors.HTTPMultipleChoices(response)
This exception inherits from HTTPRedirect.

300 Multiple Choices

exception arya_api_framework.errors.HTTPMovedPermanently(response)
This exception inherits from HTTPRedirect.

301 Moved Permanently

exception arya_api_framework.errors.HTTPFound(response)
This exception inherits from HTTPRedirect.

302 Found

exception arya_api_framework.errors.HTTPSeeOther(response)
This exception inherits from HTTPRedirect.

303 See Other

exception arya_api_framework.errors.HTTPNotModified(response)
This exception inherits from HTTPRedirect.

304 Not Modified

exception arya_api_framework.errors.HTTPUseProxy(response)
This exception inherits from HTTPRedirect.

305 Use Proxy

exception arya_api_framework.errors.HTTPReserved(response)
This exception inherits from HTTPRedirect.

306 (Unused)

exception arya_api_framework.errors.HTTPTemporaryRedirect(response)
This exception inherits from HTTPRedirect.

307 Temporary Redirect

exception arya_api_framework.errors.HTTPPermanentRedirect(response)
This exception inherits from HTTPRedirect.

308 Permanent Redirect

400 Errors

exception arya_api_framework.errors.HTTPBadRequest(response)
This exception inherits from HTTPClientError.

400 Bad Request

exception arya_api_framework.errors.HTTPUnauthorized(response)
This exception inherits from HTTPClientError.

401 Unauthorized

exception arya_api_framework.errors.HTTPPaymentRequired(response)
This exception inherits from HTTPClientError.

402 Payment Required

exception arya_api_framework.errors.HTTPForbidden(response)
This exception inherits from HTTPClientError.

403 Forbidden

exception arya_api_framework.errors.HTTPNotFound(response)
This exception inherits from HTTPClientError.

404 Not Found

exception arya_api_framework.errors.HTTPMethodNotAllowed(response)
This exception inherits from HTTPClientError.

405 Method Not Allowed

exception arya_api_framework.errors.HTTPNotAcceptable(response)
This exception inherits from HTTPClientError.

406 Not Acceptable

exception arya_api_framework.errors.HTTPProxyAuthenticationRequired(response)
This exception inherits from HTTPClientError.

407 Proxy Authentication Required

exception arya_api_framework.errors.HTTPRequestTimeout(response)
This exception inherits from HTTPClientError.

408 Request Timeout

exception arya_api_framework.errors.HTTPConflict(response)
This exception inherits from HTTPClientError.

409 Conflict

exception arya_api_framework.errors.HTTPGone(response)
This exception inherits from HTTPClientError.

410 Gone

exception arya_api_framework.errors.HTTPLengthRequired(response)
This exception inherits from HTTPClientError.

411 Length Required

exception arya_api_framework.errors.HTTPPreconditionFailed(response)
This exception inherits from HTTPClientError.

412 Precondition Failed

exception arya_api_framework.errors.HTTPRequestEntityTooLarge(response)
This exception inherits from HTTPClientError.

413 Content Too Large

exception arya_api_framework.errors.HTTPRequestUriTooLong(response)
This exception inherits from HTTPClientError.

414 URI Too Long

exception arya_api_framework.errors.HTTPUnsupportedMediaType(response)
This exception inherits from HTTPClientError.

415 Unsupported Media Type

exception arya_api_framework.errors.HTTPRequestedRangeNotSatisfiable(response)
This exception inherits from HTTPClientError.

416 Range Not Satisfiable

exception arya_api_framework.errors.HTTPExpectationFailed(response)
This exception inherits from HTTPClientError.

417 Expectation Failed

exception arya_api_framework.errors.HTTPImATeapot(response)
This exception inherits from HTTPClientError.

418 (Unused)

exception arya_api_framework.errors.HTTPMisdirectedRequest(response)
This exception inherits from HTTPClientError.

421 Misdirected Request

exception arya_api_framework.errors.HTTPUnprocessableEntity(response)
This exception inherits from HTTPClientError.

422 Unprocessable Content

exception arya_api_framework.errors.HTTPFailedDependency(response)
This exception inherits from HTTPClientError.

424 Object Required

exception arya_api_framework.errors.HTTPTooEarly(response)
This exception inherits from HTTPClientError.

425 Too Early

exception arya_api_framework.errors.HTTPUpgradeRequired(response)
This exception inherits from HTTPClientError.

426 Upgrade Required

exception arya_api_framework.errors.HTTPPreconditionRequired(response)
This exception inherits from HTTPClientError.

428 Precondition Required

exception arya_api_framework.errors.HTTPTooManyRequests(response)
This exception inherits from HTTPClientError.

429 Too Many Requests

exception arya_api_framework.errors.HTTPRequestHeaderFieldsTooLarge(response)
This exception inherits from HTTPClientError.

431 Request header Fields Too Large

exception arya_api_framework.errors.HTTPUnavailableForLegalReasons(response)
This exception inherits from HTTPClientError.

451 Unavailable for Legal Reasons

500 Errors

exception arya_api_framework.errors.HTTPInternalServerError(response)
This exception inherits from HTTPClientError.

500 Internal Server Error

exception arya_api_framework.errors.HTTPNotImplemented(response)
This exception inherits from HTTPClientError.

501 Not Implemented

exception arya_api_framework.errors.HTTPBadGateway(response)
This exception inherits from HTTPClientError.

502 Bad Gateway

exception arya_api_framework.errors.HTTPServiceUnavailable(response)
This exception inherits from HTTPClientError.

503 Service Unavailable

exception arya_api_framework.errors.HTTPGatewayTimeout(response)
This exception inherits from HTTPClientError.

504 Gateway Timeout

exception arya_api_framework.errors.HTTPHttpServerVersionNotSupported(response)
This exception inherits from HTTPClientError.

505 HTTP Version Not Supported

exception arya_api_framework.errors.HTTPVariantAlsoNegotiates(response)
This exception inherits from HTTPClientError.

506 Variant Also Negotiates

exception arya_api_framework.errors.HTTPInsufficientStorage(response)
This exception inherits from HTTPClientError.

507 Insufficient Storage

exception arya_api_framework.errors.HTTPLoopDetected(response)
This exception inherits from HTTPClientError.

508 Loop Detected

exception arya_api_framework.errors.HTTPNotExtended(response)
This exception inherits from HTTPClientError.

510 Not Extended

exception arya_api_framework.errors.HTTPNetworkAuthenticationRequired(response)
This exception inherits from HTTPClientError.

511 Network Authentication Required

Exception Hierarchy