Sprites.Error.APIError exception (Sprites v0.1.0)
View SourceRaised when the API returns an error response.
Provides detailed information about rate limits and other API errors.
Summary
Functions
Returns the number of seconds to wait before retrying. Prefers the JSON field, falling back to the header value.
Returns true if this is a concurrent sprite limit error
Returns true if this is a sprite creation rate limit error
Returns true if this is a 429 rate limit error
Types
@type t() :: %Sprites.Error.APIError{ __exception__: term(), body: String.t() | nil, current_count: integer() | nil, error_code: String.t() | nil, limit: integer() | nil, message: String.t() | nil, rate_limit_limit: integer() | nil, rate_limit_remaining: integer() | nil, rate_limit_reset: integer() | nil, retry_after_header: integer() | nil, retry_after_seconds: integer() | nil, status: integer() | nil, upgrade_available: boolean() | nil, upgrade_url: String.t() | nil, window_seconds: integer() | nil }
Functions
Returns the number of seconds to wait before retrying. Prefers the JSON field, falling back to the header value.
Returns true if this is a concurrent sprite limit error
Returns true if this is a sprite creation rate limit error
Returns true if this is a 429 rate limit error