mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add more clear error messages to TTS
This commit is contained in:
@ -127,14 +127,14 @@ class EdgeTtsProvider {
|
||||
}
|
||||
)
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP ${response.status}: ${await response.json()}`)
|
||||
toastr.error(response.statusText);
|
||||
throw new Error(`HTTP ${response.status}`)
|
||||
}
|
||||
return response
|
||||
}
|
||||
}
|
||||
function throwIfModuleMissing() {
|
||||
if (!modules.includes('edge-tts')) {
|
||||
|
||||
toastr.error(`Edge TTS module not loaded. Add edge-tts to enable-modules and restart the Extras API.`)
|
||||
throw new Error(`Edge TTS module not loaded.`)
|
||||
}
|
||||
|
Reference in New Issue
Block a user