ai_api_client_sdk.exception module¶
- exception ai_api_client_sdk.exception.AIAPIClientSDKException(description: str, status_code: int = None, error_message: str = None)¶
Bases:
ExceptionBase Exception class for AI API Client SDK exceptions
- __init__(description: str, status_code: int = None, error_message: str = None)¶
- exception ai_api_client_sdk.exception.AIAPIInvalidInputException(description: str)¶
Bases:
AIAPIClientSDKExceptionException type raised, when the provided input is invalid
- __init__(description: str)¶
- exception ai_api_client_sdk.exception.AIAPIAuthenticatorException(status_code: int = None, error_message: str = None)¶
Bases:
AIAPIClientSDKExceptionException type that is raised by the
ai_api_client_sdk.helpers.authenticator.Authenticator- __init__(status_code: int = None, error_message: str = None)¶
- exception ai_api_client_sdk.exception.AIAPIAuthenticatorInvalidRequestException(error_message: str = None)¶
Bases:
AIAPIAuthenticatorExceptionException type that is raised by the
ai_api_client_sdk.helpers.authenticator.Authenticatorif the XSUAA server responded with bad request when trying to retrieve a token- __init__(error_message: str = None)¶
- exception ai_api_client_sdk.exception.AIAPIAuthenticatorAuthorizationException(error_message: str = None)¶
Bases:
AIAPIAuthenticatorExceptionException type that is raised by the
ai_api_client_sdk.helpers.authenticator.Authenticatorif the XSUAA server responded with unauthorized when trying to retrieve a token- __init__(error_message: str = None)¶
- exception ai_api_client_sdk.exception.AIAPIAuthenticatorForbiddenException(error_message: str = None)¶
Bases:
AIAPIAuthenticatorExceptionException type that is raised by the
ai_api_client_sdk.helpers.authenticator.Authenticatorif the XSUAA server responded with forbidden when trying to retrieve a token- __init__(error_message: str = None)¶
- exception ai_api_client_sdk.exception.AIAPIAuthenticatorMethodNotAllowedException(error_message: str = None)¶
Bases:
AIAPIAuthenticatorExceptionException type that is raised by the
ai_api_client_sdk.helpers.authenticator.Authenticatorif the XSUAA server responded with method not allowed when trying to retrieve a token- __init__(error_message: str = None)¶
- exception ai_api_client_sdk.exception.AIAPIAuthenticatorTimeoutException(error_message: str = None)¶
Bases:
AIAPIAuthenticatorExceptionException type that is raised by the
ai_api_client_sdk.helpers.authenticator.Authenticatorif the XSUAA server responded with request timeout when trying to retrieve a token- __init__(error_message: str = None)¶
- exception ai_api_client_sdk.exception.AIAPIAuthenticatorServerException(status_code: int = None, error_message: str = None)¶
Bases:
AIAPIAuthenticatorExceptionException type that is raised by the
ai_api_client_sdk.helpers.authenticator.Authenticatorif the XSUAA server responded with server error when trying to retrieve a token- __init__(status_code: int = None, error_message: str = None)¶
- exception ai_api_client_sdk.exception.AIAPIServerException(description: str, status_code: int, error_message: str, error_code: str = None, request_id: str = None, details: dict = None)¶
Bases:
ExceptionException type that is raised by the
ai_api_client_sdk.helpers.rest_client.RestClient, if a non-2XX response is received from the server.- Parameters:
description (str) – description of the exception
status_code (int) – Status code of the response from the server
error_message (str) – Error message received from the server
error_code (str, optional) – Error code received from the server, defaults to None
request_id (str, optional) – ID of the request, the response belongs to, defaults to None
details (dict, optional) – Error details received from the server, defaults to None
- __init__(description: str, status_code: int, error_message: str, error_code: str = None, request_id: str = None, details: dict = None)¶
- exception ai_api_client_sdk.exception.AIAPIAuthorizationException(description: str, error_message: str, error_code: str = None, request_id: str = None, details: dict = None)¶
Bases:
AIAPIServerExceptionException type that is raised by the
ai_api_client_sdk.helpers.rest_client.RestClientif a 401 response is received from the server. This extends theai_api_client_sdk.exception.AIAPIServerException, refer there for object definition- __init__(description: str, error_message: str, error_code: str = None, request_id: str = None, details: dict = None)¶
- exception ai_api_client_sdk.exception.AIAPIInvalidRequestException(description: str, error_code: str, error_message: str, request_id: str, details: dict = None)¶
Bases:
AIAPIServerExceptionException type that is raised by the
ai_api_client_sdk.helpers.rest_client.RestClientif a 400 response is received from the server. This extends theai_api_client_sdk.exception.AIAPIServerException, refer there for object definition- __init__(description: str, error_code: str, error_message: str, request_id: str, details: dict = None)¶
- exception ai_api_client_sdk.exception.AIAPINotFoundException(description: str, error_code: str, error_message: str, request_id: str, details: dict = None)¶
Bases:
AIAPIServerExceptionException type that is raised by the
ai_api_client_sdk.helpers.rest_client.RestClientif a 404 response is received from the server. This extends theai_api_client_sdk.exception.AIAPIServerException, refer there for object definition- __init__(description: str, error_code: str, error_message: str, request_id: str, details: dict = None)¶
- exception ai_api_client_sdk.exception.AIAPIPreconditionFailedException(description: str, error_code: str, error_message: str, request_id: str, details: dict = None)¶
Bases:
AIAPIServerExceptionException type that is raised by the
ai_api_client_sdk.helpers.rest_client.RestClientif a 412 response is received from the server. This extends theai_api_client_sdk.exception.AIAPIServerException, refer there for object definition- __init__(description: str, error_code: str, error_message: str, request_id: str, details: dict = None)¶