Creates a GraphQL error from an HTTP 200 envelope's errors array.
The upstream GraphQL errors; each entry should carry a message.
Optionaldata: unknown
The partial data object returned alongside the errors, when any. Exposed as AniLinkGraphQLError.partialData.
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. AniList returns rate-limit headers even on HTTP 200 envelopes carrying GraphQL errors (for example a GraphQL-level 429), so threading them here keeps AniLinkGraphQLError.rateLimit consistent with the HTTP-failure path.
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.
ReadonlygraphqlThe upstream GraphQL errors array carried by the envelope, preserved
verbatim. Beyond message, entries typically carry an upstream status
(distinguishing "entity does not exist" from a server fault) plus
locations and extensions when AniList includes them.
Optional ReadonlypartialThe partial data object returned alongside the GraphQL errors, when
AniList produced a partial success. GraphQL can resolve some fields
while failing others; the usable portion survives here (and on the
inherited AniLinkApiError.data field) instead of being
discarded, so consumers can recover the fields that did resolve.
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.
GraphQL-level failure returned inside an HTTP 200 envelope.
The inherited AniLinkApiError.status reflects the upstream GraphQL error status when an entry in AniLinkGraphQLError.graphqlErrors carries one (for example
404or429), and the HTTP200envelope status otherwise. This makesstatusa meaningful classification field for GraphQL failures and lets status-based branching and retry policies treat a GraphQL-level429/5xxlike its HTTP-level counterpart. The200default is not an availability-class status: the circuit breaker treats a200-defaulted GraphQL error as streak-neutral. It neither advances nor resets the failure streak, because the envelope proves the upstream answered while the status-less entries carry no upstream-health signal.See
GraphQLUpstreamError