aip_sdk.APIError
aip_sdk.APIError(message: str, status_code: int | None = None, *, body: dict[str, Any] | None = None)
Base exception for AIP API errors.
Attributes
status_code: HTTP status the platform answered with, when a response arrived.bodydict[str, Any]: Parsed response body, empty when there was none or it was unreadable.request_id: Identifier the platform assigned to the failed request. Quote it to support to have the matching server-side records found.Nonewhen no response arrived.correlation_id: Identifier covering the whole operation, shared by every retry attempt. Present even when no request reached the platform.
Both are read off the call in progress rather than passed in: most sites that raise these only ever see the parsed payload, never the response it came from.
aip_sdk.APIError.body
aip_sdk.APIError.body: dict[str, Any] = body or {}
No docstring is defined in the source.
aip_sdk.APIError.correlation_id
aip_sdk.APIError.correlation_id = current_correlation_id()
No docstring is defined in the source.
aip_sdk.APIError.request_id
aip_sdk.APIError.request_id = current_request_id()
No docstring is defined in the source.
aip_sdk.APIError.status_code
aip_sdk.APIError.status_code = status_code
No docstring is defined in the source.
aip_sdk.APIError.validation_errors
aip_sdk.APIError.validation_errors: list[dict[str, Any]]
RFC 9457 problem+json validation_errors array, or [] when absent.