Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 151
fix(rpc): superjson serialization#2827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sanny-io
wants to merge
14
commits into
zenstackhq:devChoose a base branch
from
sanny-io:fix/rpc-serialization
base:dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Uh oh!
There was an error while loading. Please reload this page.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d3367c6
fix(server): rpc serialization
sanny-io 8ddadce
fix(client-helpers): serialization
sanny-io 02a1969
fix(fetch-client): transaction serialization
sanny-io 2501652
chore(fetch-client): adjust tests
sanny-io 751f1db
chore(fetch-client): add `$transaction` superjson test
sanny-io dbe80db
chore(fetch-client): regenerate schema
sanny-io 12f8fa3
chore(tanstack-query): adjust tests
sanny-io e86ca4f
chore(client-helpers): adjust tests
sanny-io 6a09e42
chore(server): adjust rest and rpc query params
sanny-io 58fb5d1
chore(server): adjust adapter tests
sanny-io 17e8fa6
chore(server): adjust rpc open api tests
sanny-io 8083594
chore(cli): adjust tests
sanny-io 2881fb5
chore: regenerate schemas
sanny-io fe9ce9e
chore(fetch-client): fix test
sanny-io File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Keep non-OK RPC error bodies compatible with
fetcher.RPCApiHandler.makeBadInputErrorResponse,makeGenericErrorResponse, andmakeORMErrorResponsereturn{ error: ... }, not{ data: ... }.unmarshalnow returnsparsed.data, which isundefinedfor these responses.fetcherthen dereferenceserrData.errorand throws aTypeErrorinstead of the intendedQueryError.packages/clients/client-helpers/src/fetch.ts#L128-L129: preserve raw error-body parsing in the non-OK path, or standardize all server error responses as{ data: { error } }.packages/clients/client-helpers/test/fetch.test.ts#L237-L237: mock the raw server error body if client compatibility remains required.packages/clients/client-helpers/test/fetch.test.ts#L261-L261: mock the raw policy-rejection error body.packages/clients/fetch-client/test/fetch-client.test.ts#L368-L368: mock the raw 404 error body.packages/clients/fetch-client/test/fetch-client.test.ts#L397-L397: mock the raw policy-rejection error body.packages/clients/fetch-client/test/fetch-client.test.ts#L409-L409: mock the raw 500 error body.packages/clients/fetch-client/test/fetch-client.test.ts#L592-L593: mock the raw transaction error body.📍 Affects 3 files
packages/clients/client-helpers/src/fetch.ts#L128-L129(this comment)packages/clients/client-helpers/test/fetch.test.ts#L237-L237packages/clients/client-helpers/test/fetch.test.ts#L261-L261packages/clients/fetch-client/test/fetch-client.test.ts#L368-L368packages/clients/fetch-client/test/fetch-client.test.ts#L397-L397packages/clients/fetch-client/test/fetch-client.test.ts#L409-L409packages/clients/fetch-client/test/fetch-client.test.ts#L592-L593🤖 Prompt for AI Agents