Exceptions
TinkerError Objects¶
class TinkerError(Exception)
Base exception for all Logits-related errors.
When importing from logits, logits.LogitsError is an alias of TinkerError.
APIError Objects¶
class APIError(TinkerError)
Base class for all API-related errors.
body¶
The API response body.
If the API responded with a valid JSON structure then this property will be the decoded result.
If it isn't a valid JSON structure then this will be the raw response.
If there was no response associated with this error then it will be None.
APIResponseValidationError Objects¶
class APIResponseValidationError(APIError)
Raised when API response doesn't match expected schema.
APIStatusError Objects¶
class APIStatusError(APIError)
Raised when an API response has a status code of 4xx or 5xx.
APIConnectionError Objects¶
class APIConnectionError(APIError)
Raised when a connection error occurs while making an API request.
APITimeoutError Objects¶
class APITimeoutError(APIConnectionError)
Raised when an API request times out.
BadRequestError Objects¶
class BadRequestError(APIStatusError)
HTTP 400: The request was invalid or malformed.
AuthenticationError Objects¶
class AuthenticationError(APIStatusError)
HTTP 401: Authentication credentials are missing or invalid.
PermissionDeniedError Objects¶
class PermissionDeniedError(APIStatusError)
HTTP 403: Insufficient permissions to access the resource.
NotFoundError Objects¶
class NotFoundError(APIStatusError)
HTTP 404: The requested resource was not found.
ConflictError Objects¶
class ConflictError(APIStatusError)
HTTP 409: The request conflicts with the current state of the resource.
UnprocessableEntityError Objects¶
class UnprocessableEntityError(APIStatusError)
HTTP 422: The request was well-formed but contains semantic errors.
RateLimitError Objects¶
class RateLimitError(APIStatusError)
HTTP 429: Too many requests, rate limit exceeded.
InternalServerError Objects¶
class InternalServerError(APIStatusError)
HTTP 500+: An error occurred on the server.
RequestFailedError Objects¶
class RequestFailedError(TinkerError)
Raised when an asynchronous request completes in a failed state.