"fix" 503 errors

This commit is contained in:
Natsumi
2021-03-07 12:48:56 +13:00
parent a67586aa6b
commit 009ce76fc1
+3
View File
@@ -399,6 +399,9 @@ speechSynthesis.getVoices();
} }
throw new Error('401: Missing Credentials'); throw new Error('401: Missing Credentials');
} }
if ((status === 503) && (data.error.message === 'endpoint temporarily disabled')) {
throw new Error('503: Endpoint temporarily disabled');
}
if (data.error === Object(data.error)) { if (data.error === Object(data.error)) {
this.$throw( this.$throw(
data.error.status_code || status, data.error.status_code || status,