• Parameters

    • type: "fetch_error" | "no_tokens" | "refresh_error"

      The type of error

    • error: unknown

      The error object

    Returns {
        body: {
            error: "fetch_error" | "no_tokens" | "refresh_error";
            message: string;
        };
        headers: { "content-type": string };
        ok: boolean;
        redirected: boolean;
        type: string;
        status: number;
        statusText: string;
    }

    • An error response object
    • body: { error: "fetch_error" | "no_tokens" | "refresh_error"; message: string }
    • headers: { "content-type": string }
    • ok: boolean
    • redirected: boolean
    • type: string
    • status: number

      Using the status code of 0 to indicate an opaque network error error without a server response.

      https://fetch.spec.whatwg.org/#concept-network-error

    • statusText: string

    createErrorResponse - Create an error response