exp: Simpler defaultResultHandler and status-encoded Client types - #3413
Draft
RobinTail wants to merge 35 commits into
Draft
exp: Simpler defaultResultHandler and status-encoded Client types#3413RobinTail wants to merge 35 commits into
defaultResultHandler and status-encoded Client types#3413RobinTail wants to merge 35 commits into
Conversation
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
RobinTail
commented
May 23, 2026
RobinTail
commented
May 23, 2026
# Conflicts: # example/example.documentation.yaml # express-zod-api/tests/__snapshots__/documentation.spec.ts.snap # migration/index.ts
RobinTail
force-pushed
the
simpler-default-result
branch
from
July 5, 2026 18:36
297a76d to
de1a4c1
Compare
# Conflicts: # CHANGELOG.md # compat-test/eslint.config.js # compat-test/migration.spec.ts # compat-test/package.json # example/example.client.ts # example/example.documentation.yaml # express-zod-api/src/integration-base.ts # express-zod-api/src/integration.ts # express-zod-api/tests/__snapshots__/documentation.spec.ts.snap # express-zod-api/tests/__snapshots__/integration.spec.ts.snap # migration/index.spec.ts # migration/index.ts
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.
The idea is to change the payload of
defaultResultHandlerin order to make it smaller and simpler by removing thestatus: success | errordiscriminator as well asdata | errorwrapper. The status is already conveyed by the HTTP status code, so it is redundant.That, however, requires to discriminate by the HTTP status on consumer side. Luckily, we do already have an entity called
EncodedResponse(introduced as a result of #2219 discussion). With minor changes it can be used as a tuple-driven discriminator for the returns ofClient::provide().The whole change is breaking both for developers and the consumers of their APIs. Therefore a comprehensive migration path is required.