More unified TTS error messages

This commit is contained in:
Cohee
2023-06-05 17:01:59 +03:00
parent fdaf58061f
commit b3ec66faa7
4 changed files with 20 additions and 18 deletions

View File

@@ -123,7 +123,7 @@ class NovelTtsProvider {
)
if (!response.ok) {
toastr.error(response.statusText, 'TTS Generation Failed');
throw new Error(`HTTP ${response.status}`);
throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}
return response
}