openai / openai-quickstart-node

Node.js example app from the OpenAI API quickstart tutorial
https://platform.openai.com/docs/quickstart?context=node
MIT License
2.54k stars 1.99k forks source link

Error: Request failed with status code 429 #29

Closed tesnikio closed 1 year ago

tesnikio commented 1 year ago

Hi everyone! I'm trying to run the app locally but getting this error with status code 429, which is corresponds to "too many requests".

npm run dev

> openai-quickstart-node@0.1.0 dev
> next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info  - Loaded env from /Users/tesnik/Desktop/Workspace/FullStack/openai-quickstart-node/.env
wait  - compiling...
event - compiled client and server successfully in 167 ms (113 modules)
Browserslist: caniuse-lite is outdated. Please run:
  npx browserslist@latest --update-db
  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
wait  - compiling / (client and server)...
wait  - compiling...
event - compiled client and server successfully in 70 ms (132 modules)
wait  - compiling /_error (client and server)...
wait  - compiling...
event - compiled client and server successfully in 42 ms (133 modules)
wait  - compiling /api/generate...
wait  - compiling...
event - compiled client and server successfully in 114 ms (143 modules)
error - Error: Request failed with status code 429
error - Error: Request failed with status code 429
error - Error: Request failed with status code 429
error - Error: Request failed with status code 429
error - Error: Request failed with status code 429
error - Error: Request failed with status code 429

Does this mean that I ran out of free quota or what? Appreciate any help, thanks!

tupkalenko commented 1 year ago

Have same issue

schnerd commented 1 year ago

Hi @teslyuk and @tupkalenko – I just implemented better error handling logic which should surface better error messages and in the logs. Can you pull the latest version and give it another try?

My guess is maybe you are out of credits on your account, but it will be helpful to see the actual error message.

tesnikio commented 1 year ago

Hi @schnerd, yeah, seems like I'm out of quota. Thanks for the quick response!