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_code
int - The HTTP status code to map.default_message
str, optional - The default message to use if no specific message is available.
Returns:
AixplainBaseException
- An exception of the appropriate type.