@grafctory/http - v0.9.0
    Preparing search index...

    Type Alias Problem

    Problem details for HTTP APIs.

    Portable description of an error condition, as defined by RFC 9457, which obsoletes RFC 7807. Every field is optional, so a problem carries as much detail as its source provides. type and title classify the problem, status, detail and instance pin it to a specific occurrence, and report carries machine-readable data.

    toProblem normalises an arbitrary failure value into this shape and isProblem recognises a value already carrying it.

    reject rejects unsuccessful responses in this shape, and resolve restates a problem as a response; a client assembled with both surfaces transport failures and error responses alike as problems.

    const problem: Problem = {
    status: 404,
    title: "Not Found",
    detail: "Resource /api/users/123 does not exist",
    instance: "/api/users/123",
    report: { timestamp: "2025-12-02T10:30:00Z" }
    };
    type Problem = {
        type?: string;
        status?: number;
        title?: string;
        detail?: string;
        instance?: string;
        report?: Value;
    }
    Index
    type?: string

    URI reference identifying the problem type.

    "about:blank"
    
    status?: number

    HTTP status code generated by the origin server.

    NetworkError where no origin server assigned one, as for a failure toProblem normalises.

    title?: string

    Short, human-readable summary of the problem type.

    Should be the same for all occurrences of this problem type, for example Payment Required or Not Found.

    detail?: string

    Human-readable explanation specific to this occurrence of the problem.

    instance?: string

    URI reference identifying the specific occurrence of the problem.

    report?: Value

    Machine-readable details about this occurrence of the problem.

    An RFC 9457 extension member, such as a validation trace or a diagnostic payload consumers may branch on.