interface ProblemDetails
Since 0.1.0

A Problem Details object as defined by RFC 9457.

Extension members beyond the five core fields are allowed (RFC 9457 ยง3.2), so errors and stack may be present.

Index Signatures

readonly [key: string] : unknown

Properties

readonly
type: string

A URI reference identifying the problem type.

readonly
title: string

A short, human-readable summary of the problem type.

readonly
status: number

The HTTP status code generated for this occurrence.

readonly
detail: string

A human-readable explanation specific to this occurrence.

readonly
optional
instance: string

A URI reference identifying the specific occurrence (request path).

readonly
optional
errors: ReadonlyArray<{ field: string; message: string; code?: string; }>

Optional validation failures extension (present for 422 errors).

readonly
optional
stack: string

Optional stack trace (present only when includeStackTrace is on).

Usage

import { type ProblemDetails } from "exceptions/src/index.ts";