Iskra API Reference
    Preparing search index...

    Interface Problem

    An error as the response contract sees it: what the client is told and with which status. The Kernel builds one for every error (thrown, a 404, a failed validation, a feature's refusal) and the contract turns it into the body.

    interface Problem {
        code: ErrorCode;
        context?: Record<string, unknown>;
        details?: unknown;
        headers?: Record<string, string>;
        message: string;
        requestId?: string;
        stack?: string;
        status: number;
    }
    Index
    code: ErrorCode
    context?: Record<string, unknown>

    An HttpError's context: sent for a 4xx, or with includeStack.

    details?: unknown

    A validation's details (which fields failed and why).

    headers?: Record<string, string>

    Headers the response carries: Allow for a 405, WWW-Authenticate for a 401.

    message: string

    What the client may read: the message of an HttpError, a Hono HTTPException or an error marked expose; for anything else the status text (Internal Server Error), unless includeStack is on.

    requestId?: string

    The request's id, when RequestIdFeature set one.

    stack?: string

    Only with includeStack.

    status: number