Skip to content

fix: keep the API's suggestion in session creation errors - #84

Merged
ClayMav merged 1 commit into
mainfrom
clay/session-error-suggestion
Oct 21, 2026
Merged

ClayMav merged 1 commit into
mainfrom
clay/session-error-suggestion

Conversation

@ClayMav

@ClayMav ClayMav commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Summary

When the API refuses POST /sql/session, its error body includes a suggestion that 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 its InterfaceError from message and details only, 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 suggestion when 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

  • I have self-reviewed my own code
  • I have added/updated tests that prove my fix/feature works
  • I have included visual proof (screenshot, video, or test output) if applicable
  • All CI checks are passing
  • PR size is S/M, OR I have justified the size and added a walkthrough
  • I have updated documentation if needed

Visual Proof

I called connect() against a local stub that returns the API's real 403 quota body:

with this branch:
InterfaceError: Failed to create SQL session: Insufficient Quota: The total requested cpu exceed the quota. Contact us at [email protected] to request a quota increase.
0.30.0 (released):
InterfaceError: Failed to create SQL session: Insufficient Quota: The total requested cpu exceed the quota

New test test_session_error_keeps_suggestion fails on main and passes here:

$ uv run pytest tests/test_driver.py -q
38 passed
$ pre-commit run --all-files   -> passed

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

  • Requester checklist above is complete
  • All CI checks are passing
  • Tests adequately cover the changes

Changes made by Claude Opus 5.5 (claude-opus-5-5) running in Claude Code.

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.
@ClayMav

ClayMav commented Oct 21, 2026

Copy link
Copy Markdown
Member Author

@salty-hambot review

@salty-hambot salty-hambot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed by Salty Hambot 🤖🧂 at bf63f32

No issues found.
💰 $0.0435 · 29.4k in / 952 out tokens · ⏱️ 10.8s · us.openai.gpt-6-sol high, prompt coverage-v1
💬 To request a re-review, comment @salty-hambot review

@ClayMav
ClayMav marked this pull request as ready for review October 21, 2026 19:24
@ClayMav
ClayMav requested a review from a team as a code owner October 21, 2026 19:24
@ClayMav
ClayMav merged commit bbb17b6 into main Oct 21, 2026
7 checks passed
@ClayMav
ClayMav deleted the clay/session-error-suggestion branch October 21, 2026 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants