Skip to content

feat(api): use problem details for error responses#41

Merged
v-byte-cpu merged 1 commit into
mainfrom
feat/api-problem-details-errors
Jun 8, 2026
Merged

feat(api): use problem details for error responses#41
v-byte-cpu merged 1 commit into
mainfrom
feat/api-problem-details-errors

Conversation

@v-byte-cpu

Copy link
Copy Markdown
Member

Why

API error payloads should follow RFC 9457 Problem Details as the HTTP wire contract, while DomainError
stays the normalized app/UI contract. This separates external API semantics from service, query, Tauri, and
UI error handling.

What Changed

  • Replaces API/OpenAPI error responses with application/problem+json Problem Details.
  • Uses /problems/* problem type values with title, status, and detail fields.
  • Maps Problem Details payloads back into DomainError in the UI API boundary.
  • Keeps validation issues as structured facts with path, code, and params.
  • Updates mock server problem responses, generated API artifacts, tests, and error-handling guidance.

Validation

  • pnpm test:ui
  • pnpm check:ui
  • pnpm test:mock-api

Replace API error responses with RFC 9457-style Problem Details and keep
DomainError as the normalized UI/service error contract.

API error responses now use application/problem+json with
/problem/* type values, title/status/detail fields, and structured validation
issues instead of the previous DomainError-shaped JSON payload.
@v-byte-cpu v-byte-cpu merged commit d5be6aa into main Jun 8, 2026
3 checks passed
@v-byte-cpu v-byte-cpu deleted the feat/api-problem-details-errors branch June 8, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant