AniLink - v2.0.0
    Preparing search index...

    Class AniLinkRestError

    A REST-level failure returned by a REST-style provider.

    REST APIs report failures as plain HTTP status codes with a JSON (or HTML) body rather than inside a GraphQL envelope, so this subclass exists to give consumers a stable type to branch on without inspecting status codes. It carries no additional fields beyond AniLinkApiError; its value is the named type itself.

    Hierarchy (View Summary)

    Index
    • Creates an API error while preserving the upstream response body.

      Parameters

      • status: number

        The HTTP status returned by AniList.

      • data: unknown

        The response body returned by AniList.

      • OptionalrawAxiosError: unknown

        The original Axios error when raw diagnostics are enabled.

      • Optionaloptions: { rateLimit?: RateLimitInfo }

        Additional error metadata such as rate-limit headers.

      Returns AniLinkRestError

    Stable code used to classify the failure.

    data: unknown

    Response body returned by the upstream API, preserved verbatim.

    rateLimit?: RateLimitInfo

    Rate-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.

    rawAxiosError?: unknown

    Original Axios or transport error when raw diagnostics were enabled.

    status: number

    HTTP status returned by the upstream API.