Exceptions¶
The GPP Client defines a hierarchy of exceptions to allow users to handle
failures in a predictable and structured way. All exceptions inherit from
GPPError.
Most users will only need to catch high-level categories such as
GPPAuthError or GPPNetworkError. More advanced error handling can use
the full exception tree.
API Reference¶
Exceptions for the GPP client library.
- exception gpp_client.exceptions.GPPAuthError[source]¶
Bases:
GPPErrorRaised when authentication fails (missing token, expired token, unauthorized).
- exception gpp_client.exceptions.GPPClientError[source]¶
Bases:
GPPErrorRaised when there is a client-side error.
- exception gpp_client.exceptions.GPPError[source]¶
Bases:
ExceptionBase class for all exceptions raised by the GPP client library.
- exception gpp_client.exceptions.GPPNetworkError[source]¶
Bases:
GPPErrorRaised when there is a network-related error.
- exception gpp_client.exceptions.GPPResponseError(status_code: int, message: str)[source]¶
Bases:
GPPErrorRaised when GPP returns a non-successful HTTP or GraphQL response.
This includes: - 5xx server errors - 4xx errors (if you choose to treat them as exceptional) - Valid GraphQL response with an ‘errors’ field
- exception gpp_client.exceptions.GPPRetryableError[source]¶
Bases:
GPPErrorRaised for errors that may be transient and worth retrying.
- exception gpp_client.exceptions.GPPTimeoutError[source]¶
Bases:
GPPNetworkErrorRaised when a network operation times out.
- exception gpp_client.exceptions.GPPValidationError[source]¶
Bases:
GPPClientErrorRaised when there is a validation error (e.g., invalid input data).