Clean up logging of API errors

This commit is contained in:
Jackson Harper 2023-02-16 16:45:37 +08:00
parent f06ebe4e25
commit 3dde59c4a6

View file

@ -54,8 +54,6 @@ export class RealisticTextToSpeech implements TextToSpeech {
}
const requestUrl = `${apiEndpoint}${voiceId}`
console.log('using voice id', voiceId, requestUrl)
const response = await axios.post<Buffer>(
requestUrl,
{
@ -68,6 +66,7 @@ export class RealisticTextToSpeech implements TextToSpeech {
)
if (response.data.length === 0) {
console.log('No payload returned: ', response)
throw new Error('No payload returned')
}