send error notification over websocket if tts fails

This commit is contained in:
Dave Horton
2022-04-21 14:33:49 -04:00
parent 698d12a95f
commit 13ea559cb1
3 changed files with 12 additions and 0 deletions

View File

@@ -51,6 +51,7 @@ class TaskSay extends Task {
alert_type: AlertType.TTS_NOT_PROVISIONED,
vendor
}).catch((err) => this.logger.info({err}, 'Error generating alert for no tts'));
this.notifyError(`No speech credentials have been provisioned for ${vendor}`);
throw new Error('no provisioned speech credentials for TTS');
}
// synthesize all of the text elements
@@ -96,6 +97,7 @@ class TaskSay extends Task {
vendor,
detail: err.message
}).catch((err) => this.logger.info({err}, 'Error generating alert for tts failure'));
this.notifyError(err.message || err);
return;
}
};