Skip to content

feat(api-client): always catch 4xx and 5xx errors regardless of body type#2052

Merged
jonaro00 merged 2 commits intomainfrom
api-client-tobodycontent
May 27, 2025
Merged

feat(api-client): always catch 4xx and 5xx errors regardless of body type#2052
jonaro00 merged 2 commits intomainfrom
api-client-tobodycontent

Conversation

@jonaro00
Copy link
Member

Switches the error condition (when we should read the body as ApiError) from
not(200 or 101) to 4xx or 5xx.

And makes sure each call with a plain verb uses one of the to_* methods to parse and return an error if there is one.

@jonaro00 jonaro00 merged commit 30bb74a into main May 27, 2025
22 checks passed
@jonaro00 jonaro00 deleted the api-client-tobodycontent branch May 27, 2025 13:22
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.

2 participants