Raised or returned when a call could not be made within the service's
configured rate limit :wait budget.
This is an Errata infrastructure error. The same
value is returned in an {:error, error} tuple by ExternalService.call/3 and
raised by ExternalService.call!/3.
Its :context contains:
:service— the service the call was made against.:retry_after— milliseconds until the call would have been admitted, as reported by the rate limiter backend.
Only services configured with rate_limit: [wait: ...] can produce this error;
the default (wait: :infinity) waits as long as it takes. Because the wrapped
function never ran, this does not melt the circuit breaker and is not
retried — retrying immediately would only be throttled again.
Summary
Functions
Returns the HTTP status code associated with this error (503 by default).
Types
@type t() :: Errata.infrastructure_error()
Functions
@spec http_status(Errata.error()) :: non_neg_integer()
Returns the HTTP status code associated with this error (503 by default).
The default is derived from the error's kind, or set via the :http_status
option. Override this function to compute a status from the error's :reason
or :context. See also Errata.http_status/1.