diff --git a/index.html b/index.html
index 578a0f1..5442313 100644
--- a/index.html
+++ b/index.html
@@ -37,7 +37,10 @@
Text-to-Audio Converter
-
+
+
+
Es ist ein Fehler bei der Anfrage aufgetreten.
Bist du dir sicher das genug Guthaben verfügbar ist?
+
Converting...
diff --git a/main.js b/main.js
index dfeab5d..f12bdd0 100644
--- a/main.js
+++ b/main.js
@@ -148,8 +148,10 @@ function callOpenAIAPI(segment, apiKey, callback) {
if (xhr.status === 200) {
var audioBlob = xhr.response;
callback(audioBlob);
+ document.getElementById('error-indicator').style.display = 'none';
} else {
console.error("Error calling OpenAI API: " + xhr.statusText);
+ document.getElementById('error-indicator').style.display = 'block';
}
};