Skip to content

server: uniform error handling — domain errors → HTTP with stable codes and detail (part of the contract) #31

Description

@JArmandoAnaya

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

  • Every domain error type has a mapped test
  • Error schema present in openapi.json

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    apivisionset.server — REST API and OpenAPI contractm3M3 — Surfaces: API + CLI + MCP (0.0.1-alpha.3)

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions