Skip to content

Catch client exception - #101

Merged
maxmmitchell merged 1 commit into
mainfrom
client-exception
Oct 21, 2026
Merged

maxmmitchell merged 1 commit into
mainfrom
client-exception

Conversation

@maxmmitchell

Copy link
Copy Markdown
Contributor

ClientExceptions can be thrown in a variety of scenarios, such as when the user is out of quota. Rather than crashing the CLI, we should catch and log these exceptions and print a helpful error message to the user.

@maxmmitchell
maxmmitchell marked this pull request as ready for review October 20, 2026 20:28
@maxmmitchell
maxmmitchell marked this pull request as draft October 20, 2026 20:35
@maxmmitchell
maxmmitchell marked this pull request as ready for review October 20, 2026 20:36

@cka-dev cka-dev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm, but I would recommend considering a differentiation of quota errors from other client errors (4xx) and tailoring the hint. For example for 429 would suggest checking quota/billing, and for 403 suggest checking the API key.

@maxmmitchell
maxmmitchell merged commit 2341f45 into main Oct 21, 2026
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants