mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-10 03:59:43 +00:00
1.0.6 - Display proper message for insufficient quota
This commit is contained in:
parent
2280e1b5f6
commit
8e4d836e08
3 changed files with 5 additions and 1 deletions
|
|
@ -68,6 +68,9 @@ public final class ApiClient {
|
|||
onMessage.accept("Incorrect API key provided.\n" +
|
||||
"You can find your API key at https://platform.openai.com/account/api-keys.");
|
||||
throw new IllegalArgumentException();
|
||||
} else if (respInfo.statusCode() == 429) {
|
||||
onMessage.accept("You exceeded your current quota, please check your plan and billing details.");
|
||||
throw new RuntimeException("Insufficient quota");
|
||||
} else {
|
||||
onMessage.accept("Something went wrong. Please try again later.");
|
||||
clearQueries();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue