From 6fa4c2c1c8e5a6866f3b4048ae69f3297badc3dc Mon Sep 17 00:00:00 2001 From: Sanskar Tiwari Date: Sun, 21 May 2023 14:16:30 +0530 Subject: [PATCH] Make openai credit error a catch all --- public/scripts/openai.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/scripts/openai.js b/public/scripts/openai.js index ef5f41cd6..85b78622b 100644 --- a/public/scripts/openai.js +++ b/public/scripts/openai.js @@ -497,9 +497,10 @@ function tryParseStreamingError(str) { } function checkQuotaError(data) { - const errorText = `

You have no credits left to use with this API key.
- Check your billing details on the - OpenAI website.

`; + const errorText = `

Encountered an error while processing your request.
+ Check you have credits available on your + OpenAI account.
+ If you have sufficient credits, please try again later.

`; if (!data) { return;