1.0.6 - Display proper message for insufficient quota

This commit is contained in:
Carl-Robert Linnupuu 2023-02-21 20:07:20 +00:00
parent 2280e1b5f6
commit 8e4d836e08
3 changed files with 5 additions and 1 deletions

View file

@ -4,7 +4,7 @@ plugins {
}
group = "ee.carlrobert"
version = "1.0.5"
version = "1.0.6"
repositories {
mavenCentral()

View file

@ -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();

View file

@ -31,6 +31,7 @@
<change-notes>
<![CDATA[
<ul>
<li><b>1.0.6</b> Display proper message for insufficient quota</li>
<li><b>1.0.5</b> Replace TextField with TextArea, remove Tahoma font, increase response max token size</li>
<li><b>1.0.4</b> Add support for 2023.* build</li>
<li><b>1.0.3</b> Server-Sent Events</li>