Context
Error responses are part of the public contract third parties program against.
Deliverables
- Exception-handler layer mapping kernel domain errors → HTTP status + stable machine
code + human detail: NotFound→404, conflicts/invalid transitions→409, validation→422,
confirmation-required→409 with explicit code, auth→401.
- Error body schema (
{code, message, detail?}) declared in OpenAPI components and used
everywhere.
- Unknown exceptions → 500 with an opaque id, never a stack trace.
Acceptance criteria
Context
Error responses are part of the public contract third parties program against.
Deliverables
code + human detail: NotFound→404, conflicts/invalid transitions→409, validation→422,
confirmation-required→409 with explicit code, auth→401.
{code, message, detail?}) declared in OpenAPI components and usedeverywhere.
Acceptance criteria
openapi.json