fix(app-server): surface more helpful errors for json-rpc#11638
Merged
fix(app-server): surface more helpful errors for json-rpc#11638
Conversation
c63d63c to
88bd8a9
Compare
celia-oai
approved these changes
Feb 12, 2026
Collaborator
celia-oai
left a comment
There was a problem hiding this comment.
what makes some request have a fallback response when there's client error, and some don't have this?
Collaborator
Author
|
@celia-oai For some codepaths we can default to some reasonable behavior for a client error (like a dynamic tool call being sent as |
88bd8a9 to
c0ee01f
Compare
bolinfest
approved these changes
Feb 12, 2026
c0ee01f to
b7f00cc
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Propagate client JSON-RPC errors for app-server request callbacks. Previously a number of possible errors were collapsed to
channel closed. Now we should be able to see the underlying client error.Summary
This change stops masking client JSON-RPC error responses as generic callback cancellation in app-server server->client request flows.
Previously, when the client responded with a JSON-RPC error, we removed the callback entry but did not send anything to the waiting oneshot receiver. Waiters then observed channel closure (for example, auth refresh request canceled: channel closed), which hid the actual client error.
Now, client JSON-RPC errors are forwarded through the callback channel and handled explicitly by request consumers.
User-visible behavior
Example: client JSON-RPC error is now propagated (not masked as "canceled")
When app-server asks the client to refresh ChatGPT auth tokens, it sends a server->client JSON-RPC request like:
{ "id": 42, "method": "account/chatgptAuthTokens/refresh", "params": { "reason": "unauthorized", "previousAccountId": "org-abc" } }If the client cannot refresh and responds with a JSON-RPC error:
app-server now forwards that error through the callback path and surfaces:
auth refresh request failed: code=-32000 message=refresh failedPreviously, this same case could be reported as:
auth refresh request canceled: channel closed