Skip to content
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

Better handle insufficient_quota errors #6

Closed
amjed-98 opened this issue Apr 6, 2023 · 4 comments
Closed

Better handle insufficient_quota errors #6

amjed-98 opened this issue Apr 6, 2023 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@amjed-98
Copy link

amjed-98 commented Apr 6, 2023

I'm running :

  • Linux fedora 37
  • Node (v-14.21.2)
  • gnome-terminal

the steps to reproduce the issue

  1. run npm install -g @builder.io/ai-shell
  2. run ai-shell config set OPENAI_KEY=<API_KEY>
  3. run ai list all log files

image


update

I've tried switching to node v-16 and still rejects but with a different error message

it seem that I have exceeded my plan limit.

but it would be great to catch the error so it doesn't freeze the shell session

image

@steve8708
Copy link
Contributor

Thanks for the update, and great point

@steve8708 steve8708 changed the title UnhandledPromiseRejectionWarning: Error: Request failed with status code 429 Better handle insufficient_quota errors Apr 7, 2023
@steve8708 steve8708 added the help wanted Extra attention is needed label Apr 7, 2023
@steve8708
Copy link
Contributor

Updated the title accordingly, we should make an update to print this nicely to the end user that they have exceeded their quote (vs the current unhelpful error message)

@ZeldOcarina
Copy link
Contributor

ha I got the point, we need to activate billing and have a payment method in place if not on the API free trial. I'll write a pull request with a brief note in the Readme!

@steve8708
Copy link
Contributor

Updated error handling in 0.0.18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants