Sanity Library Reference Docs
    Preparing search index...

    Interface HttpError

    Shared properties for HTTP errors (eg both ClientError and ServerError) Use isHttpError for type narrowing and accessing response properties.

    interface HttpError {
        statusCode: number;
        message: string;
        response: {
            body: unknown;
            url: string;
            method: string;
            headers: Record<string, string>;
            statusCode: number;
            statusMessage: string | null;
        };
    }
    Index

    Properties

    statusCode: number
    message: string
    response: {
        body: unknown;
        url: string;
        method: string;
        headers: Record<string, string>;
        statusCode: number;
        statusMessage: string | null;
    }