Repository navigation
fix: keep the API's suggestion in session creation errors - #84
Merged
Merged
Conversation
A refused POST /sql/session (for example, an exceeded quota) carries a suggestion telling the user how to resolve it. The driver dropped it, so callers such as the Wherobots MCP server could not relay it.
Member
Author
|
@salty-hambot review |
ClayMav
marked this pull request as ready for review
October 21, 2026 19:24
haizhou-zhao
approved these changes
Oct 21, 2026
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.
Summary
When the API refuses
POST /sql/session, its error body includes asuggestionthat tells the user how to fix the problem. For an exceeded quota, that's "Contact us at [email protected] to request a quota increase."connect()built itsInterfaceErrorfrommessageanddetailsonly, so the suggestion was dropped. The Wherobots MCP server passes this error to agents, so they couldn't tell users what to do.The driver now appends
suggestionwhen the body has one.Related Issues
Relates to wherobots/studio-backend#2942, which gives quota-rejected task runs the same message.
Requester Checklist
Complete these before marking Ready for Review
Visual Proof
I called
connect()against a local stub that returns the API's real 403 quota body:New test
test_session_error_keeps_suggestionfails on main and passes here:Size Justification (if L/XL)
N/A, size S.
Reviewer Checklist
If these are not met, close the tab — this PR is not ready for review
Changes made by Claude Opus 5.5 (claude-opus-5-5) running in Claude Code.