Documentation
    Preparing search index...

    Interface IProps<T>

    JSON representation of HttpError.

    contracts/common.md#principled-implementation The record lists the same method, path, status and headers as the error and a body-typed message, matching toJSON's result. The caller's T and actual body must be JSON-compatible for JSON.stringify; this generic record does not establish serializability.

    contracts/common.md#clear-and-simple-design Five fields in the error's namespace, used only for the method result.

    contracts/common.md#prohibited-implementation-shortcuts A data record.

    contracts/common.md#meaningful-documentation Each field has a one-line comment and the type parameter is described.

    interface IProps<T> {
        headers: Record<string, string | string[]>;
        message: T;
        method: "HEAD" | "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "QUERY";
        path: string;
        status: number;
    }

    Type Parameters

    • T

      Response body type

    Index
    headers: Record<string, string | string[]>

    Response headers.

    message: T

    Response body (parsed JSON or original string).

    method: "HEAD" | "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "QUERY"

    HTTP method.

    path: string

    Request path or URL.

    status: number

    HTTP status code.