Creates an API error while preserving the upstream response body.
The HTTP status returned by AniList.
The response body returned by AniList.
OptionalrawAxiosError: unknown
The original Axios error when raw diagnostics are enabled.
Optionaloptions: { contentType?: string; rateLimit?: RateLimitInfo; requestId?: string }
Additional error metadata such as rate-limit headers and the response content type.
Stable code used to classify the failure.
Optional ReadonlycontentThe Content-Type of the failing response, parsed from the upstream
response headers. REST providers such as MyAnimeList return HTML or
plain-text bodies on rate-limit and gateway error paths; this field lets
consumers distinguish a structured JSON failure payload (where
data.message is meaningful) from a non-JSON one without guessing.
Absent when the response carried no Content-Type header.
ReadonlydataResponse body returned by the upstream API, preserved verbatim.
Optional ReadonlyrateRate-limit accounting parsed from the x-ratelimit-limit,
x-ratelimit-remaining, and x-ratelimit-reset response headers,
whenever AniList includes all three. Use it to self-throttle before
the next request instead of waiting for another 429. It is never
included in the error message so logs stay clean.
Optional ReadonlyrawOriginal Axios or transport error when raw diagnostics were enabled.
Optional ReadonlyrequestLibrary-generated correlation ID joining this failure to the
onRequestStart/onResponse/onRetry/onError hook events it
produced, so a caught error can be matched to its lifecycle stream in a
metrics or logging backend. Absent on errors raised outside the
request pipeline (for example validation errors thrown before any
request is sent).
ReadonlystatusHTTP status returned by the upstream API. For GraphQL failures this is the upstream GraphQL error status when available, and the HTTP envelope status (200) otherwise.
A failure returned by an upstream HTTP API.
GraphQL providers use this class for HTTP failures and AniLinkGraphQLError for protocol-level failures. REST providers use it for every non-2xx response.