mirror of
https://github.com/NovaOSS/nova-betterchat.git
synced 2024-11-25 19:13: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')) {
|
if (text.includes('insufficient_quota')) {
|
||||||
error +=
|
error +=
|
||||||
'\nMessage from Better ChatGPT:\nWe recommend changing your API endpoint or API key';
|
'\nMessage from Better ChatGPT:\nWe recommend changing your API endpoint or API key';
|
||||||
} else {
|
} else if (response.status === 429) {
|
||||||
error += '\nRate limited! Please try again later.';
|
error += '\nRate limited!';
|
||||||
}
|
}
|
||||||
throw new Error(error);
|
throw new Error(error);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue