Skip to content

fix: normalize non-OK API responses#4

Open
imean131415 wants to merge 2 commits into
2lll5:mainfrom
imean131415:fix-api-error-normalization
Open

fix: normalize non-OK API responses#4
imean131415 wants to merge 2 commits into
2lll5:mainfrom
imean131415:fix-api-error-normalization

Conversation

@imean131415

Copy link
Copy Markdown

Summary

  • reject non-2xx HTTP responses as structured ApiError values
  • preserve JSON/text error body details, request IDs, paths, suggestions, and status codes
  • ensure HTTP errors run through the error interceptor chain instead of response interceptors
  • document frontend API error semantics in the operations guide

Validation

  • npm ci
  • npm run build

Validation ran inside a Docker container on Ubuntu with Node v20.20.2/npm 10.8.2.

Fixes #1

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.

[$40 BOUNTY] [TypeScript] Harden API response error handling

1 participant