Skip to main content

Variable: ERROR_CATEGORIES

const ERROR_CATEGORIES: readonly ["validation", "authorization", "state", "conflict", "upstream", "internal"]

Defined in: packages/contracts/src/reply.ts:20

The error taxonomy of chapter 30. Each category exists because the right answer for the caller differs:

CategoryThe caller should
validationFix the request and retry. Never retry unchanged
authorizationStop. Also used for "not found": the two are indistinguishable by design
stateRe-read and decide
conflictRe-read and retry, once
upstreamRetry with backoff. Not our fault, and the message says whose
internalRetry with backoff. Our fault; nothing about internals is disclosed

A verification outcome is NOT an error: an expired credential is a successful verification with a negative result, and indeterminate must never be collapsed into invalid. Those travel in a reply's data, not here.