feat(client): add PickResponseByStatusCode type#4791
Merged
Conversation
Bundle size check
Compiler Diagnostics (tsc)
Compiler Diagnostics (typescript-go)
Reported by octocov |
HTTP Performance Benchmark
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4791 +/- ##
=======================================
Coverage 91.47% 91.47%
=======================================
Files 177 177
Lines 11578 11578
Branches 3368 3367 -1
=======================================
Hits 10591 10591
Misses 986 986
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
baseballyama
approved these changes
Mar 13, 2026
Contributor
baseballyama
left a comment
There was a problem hiding this comment.
Thank you for your help! By leveraging this type, it seems possible to primarily use a type that only accepts 2xx responses, and switch to a type that includes 4xx and 5xx only when necessary.
Member
Author
|
@baseballyama Thank you for reviewing. I'll merge this change and include it in the next patch version. |
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.
Fixes #4590
Adding
PickResponseByStatusCodeto limit the status code for the Hono client in case of using a custom fetch that only returns a 200 response.Usage:
The author should do the following, if applicable
bun run format:fix && bun run lint:fixto format the code