type– A URI that identifies the error in the Lerian error catalog, built ashttps://errors.lerian.studio/v1/<code>. This URI repeatscode, so it does not separate two statuses that share one code.title– The HTTP status text (for example,Not Found).status– The HTTP status code.detail– A human-readable explanation for this occurrence. A500and aSILOC-0023replace the text withinternal error, so the internal cause stays inside the rail. The text varies per occurrence, and a403can carry the message the authorization service reported. Do not branch on it.code– The stable, machine-readable code (SILOC-NNNN). Dispatch on the pair ofstatusandcode, not oncodealone. One code can appear under more than one status, and each status needs a different action. For example,SILOC-0022is a 400 for a body that is not valid JSON and a 422 for a value that breaks a domain rule. A request that fails schema validation carriesSILOC-0022, anderrorsnames the fields at fault.errors– An optional list of field-level details, each with thelocationit read, amessage, and thevaluefound there. A refusal from the authorization or idempotency gate carries an emptyviolationslist instead.
400, 413, 415: Request body refused
401: Unidentified caller
403: Refused caller
404: Not found
409: Conflicts
422: Validation errors
500: Server errors
503: Rail cannot answer
A 503 that carries
SILOC-0002 means the command did not run. Retry with the same X-Idempotency. When only the receipt of a command that ran is lost, the rail returns the command’s own answer with the X-Idempotency-Fenced header. When the answer of an earlier request cannot be replayed, the rail answers 409 SILOC-0009. Reconcile the original request, and never retry it under a new key.
