mirror of
https://github.com/NovaOSS/nova-betterchat.git
synced 2024-11-25 19:43:59 +01:00
improve error message
This commit is contained in:
parent
cc82f5b29d
commit
f1580010df
|
@ -75,8 +75,8 @@ export const getChatCompletionStream = async (
|
|||
if (text.includes('insufficient_quota')) {
|
||||
error +=
|
||||
'\nMessage from Better ChatGPT:\nWe recommend changing your API endpoint or API key';
|
||||
} else {
|
||||
error += '\nRate limited! Please try again later.';
|
||||
} else if (response.status === 429) {
|
||||
error += '\nRate limited!';
|
||||
}
|
||||
throw new Error(error);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue