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 {
        message: string;
        response: {
            body: unknown;
            headers: Record<string, string>;
            method: string;
            statusCode: number;
            statusMessage: null | string;
            url: string;
        };
        statusCode: number;
    }
    Index

    Properties

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