Exceptions
pyopenf1.exceptions.PyOpenF1Error
Bases: Exception
Base exception for all pyopenf1 errors.
Source code in pyopenf1/exceptions.py
pyopenf1.exceptions.APIError
Bases: PyOpenF1Error
Raised when the OpenF1 API returns a non-success HTTP status.
Attributes:
| Name | Type | Description |
|---|---|---|
status_code |
The HTTP status code returned by the API. |
|
response_body |
The raw response body, if available. |
Source code in pyopenf1/exceptions.py
pyopenf1.exceptions.RateLimitError
Bases: APIError
Raised when the API returns HTTP 429 (Too Many Requests).
The caller should back off and retry after the period indicated by the
Retry-After header, if present.
Source code in pyopenf1/exceptions.py
pyopenf1.exceptions.AuthenticationError
Bases: APIError
Raised when the API returns HTTP 401 or 403.
Source code in pyopenf1/exceptions.py
pyopenf1.exceptions.NotFoundError
Bases: APIError
Raised when the API returns HTTP 404.
Source code in pyopenf1/exceptions.py
pyopenf1.exceptions.ServerError
Bases: APIError
Raised when the API returns an HTTP 5xx status.