feat(api): use problem details for error responses#41
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
API error payloads should follow RFC 9457 Problem Details as the HTTP wire contract, while
DomainErrorstays the normalized app/UI contract. This separates external API semantics from service, query, Tauri, and
UI error handling.
What Changed
application/problem+jsonProblem Details./problems/*problem type values withtitle,status, anddetailfields.DomainErrorin the UI API boundary.path,code, andparams.Validation
pnpm test:uipnpm check:uipnpm test:mock-api