Closed ianscott313 closed 9 months ago
{ "message": "Your account is not active, please check your billing details on our website.", "type": "billing_not_active", "param": null, "code": null }
account is active now
In my case this error happens when the 10s timeout is reached. You can check it in vercel logs
Describe the bug
Community post of affected users here: https://community.openai.com/t/api-504s-in-production-vercel-only/28795
Vercel users are currently experiencing a timeout issue with OpenAI's API, however, it is not clear the issue is a timeout due to the way error handling has been setup in the quickstart project.
Currently the sample project's fetch completion handler is trying to interpret a json response from an error string. This leads to an unclear error.
Uncaught (in promise) SyntaxError: Unexpected token 'A', "An error o"... is not valid JSON
The error handling would be more reliable if we reported on the status rather than assuming we will always get a json response. I created a pull request for it here https://github.com/openai/openai-quickstart-node/pull/46#issue-1569304290
To Reproduce
SyntaxError: Unexpected token ...
Solution
Pull request here https://github.com/openai/openai-quickstart-node/pull/46#issue-1569304290
OS
No response
Node version
No response