aixplain.exceptions
Error message registry for aiXplain SDK.
This module maintains a centralized registry of error messages used throughout the aiXplain ecosystem. It allows developers to look up existing error messages and reuse them instead of creating new ones.
get_error_from_status_code
def get_error_from_status_code(status_code: int,
error_details: str = None
) -> AixplainBaseException
Map HTTP status codes to appropriate exception types.
Arguments:
status_codeint - The HTTP status code to map.error_detailsstr, optional - Additional error details to include in the message.
Returns:
AixplainBaseException- An exception of the appropriate type.