[X] I verified that the issue exists in the latest chatgpt release
Verify webapp is working
[X] I verify that the ChatGPT webapp is working properly for this account.
Environment details
Node 18.13
Describe the Bug
Hi, I'm using the following code to call ChatGPT
try {
const res = await this.api.sendMessage(`Please translate the following: ${content}`);
} catch(err)
{...}
the code runs fine and I hit the catch block when there are network issues for example.
On other occasions, I get the stack trace below and I can't quite figure why it does not trigger the error handling.
const error = new types.ChatGPTError(msg, { cause: res })
^
ChatGPTError: OpenAI error 429: {
"error": {
"message": "That model is currently overloaded with other requests. You can retry your request, or contact us through our help center at help.openai.com if the error persists. (Please include the request ID xxx in your message.)",
"type": "server_error",
"param": null,
"code": null
}
}
at Promise.then.promptTokens (C:\Users\Norbe\GitHub\howmany-scraper\node_modules\chatgpt\src\chatgpt-api.ts:263:29)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
Verify latest release
chatgpt
releaseVerify webapp is working
Environment details
Node 18.13
Describe the Bug
Hi, I'm using the following code to call ChatGPT
the code runs fine and I hit the
catch
block when there are network issues for example. On other occasions, I get the stack trace below and I can't quite figure why it does not trigger the error handling.