Skip to main content

Interface: ProblemDetails

Defined in: packages/common/src/problem.ts:137

An RFC 9457 problem document, as sent on the wire.

Properties​

callerShould​

readonly callerShould: CallerAction

Defined in: packages/common/src/problem.ts:152

What the caller should do next.


code?​

readonly optional code?: string

Defined in: packages/common/src/problem.ts:160

The owning module's stable code for this refusal, such as subject.slug_taken, for the kinds a module raises (validation, state, conflict, upstream, unavailable). type names the kind and stays coarse; two refusals of one kind are told apart by this, so a client branches on a value instead of parsing detail. RFC 9457 extension member.


correlationId​

readonly correlationId: string

Defined in: packages/common/src/problem.ts:150

The correlation id of the request: the one thing support asks for first.


detail?​

readonly optional detail?: string

Defined in: packages/common/src/problem.ts:148

This occurrence, in words safe to show a caller. Absent when it would disclose.


errors?​

readonly optional errors?: readonly ProblemFieldError[]

Defined in: packages/common/src/problem.ts:162

Present on validation problems.


failedChecks?​

readonly optional failedChecks?: readonly string[]

Defined in: packages/common/src/problem.ts:164

Present on unavailable health problems: which named checks failed.


status​

readonly status: number

Defined in: packages/common/src/problem.ts:146


title​

readonly title: string

Defined in: packages/common/src/problem.ts:145

Fixed per kind, or per module code where the caller registered a title for that code (grant.exists says what it is, not "a concurrent change"); never varies with the occurrence.


type​

readonly type: string

Defined in: packages/common/src/problem.ts:139

Stable URI naming the error kind. Branch on this.