diff --git a/lib/tasks/gather.js b/lib/tasks/gather.js index 36e03f5a..1d1aaf43 100644 --- a/lib/tasks/gather.js +++ b/lib/tasks/gather.js @@ -171,7 +171,7 @@ class TaskGather extends Task { vendor: this.vendor }).catch((err) => this.logger.info({err}, 'Error generating alert for no stt')); // Notify application that STT vender is wrong. - this.notifyError(`No speech-to-text service credentials for ${this.vendor} have been configured`); + this.notifyError({msg: 'ASR error', details: `No speech-to-text service credentials for ${this.vendor} have been configured`}); this.notifyTaskDone(); throw new Error(`No speech-to-text service credentials for ${this.vendor} have been configured`); } @@ -395,7 +395,7 @@ class TaskGather extends Task { break; default: - this.notifyError(`Invalid vendor ${this.vendor}`); + this.notifyError({ msg: 'ASR error',details:`Invalid vendor ${this.vendor}`}); this.notifyTaskDone(); throw new Error(`Invalid vendor ${this.vendor}`); } @@ -623,7 +623,7 @@ class TaskGather extends Task { message: `Failed connecting to Deepgram speech recognizer: ${reason}`, vendor: 'deepgram', }).catch((err) => this.logger.info({err}, 'Error generating alert for deepgram connection failure')); - this.notifyError(`Failed connecting to speech vendor deepgram: ${reason}`); + this.notifyError({msg: 'ASR error',details:`Failed connecting to speech vendor deepgram: ${reason}`}); this.notifyTaskDone(); } @@ -641,7 +641,7 @@ class TaskGather extends Task { message: `Failed connecting to IBM watson speech recognizer: ${reason}`, vendor: 'ibm', }).catch((err) => this.logger.info({err}, 'Error generating alert for IBM connection failure')); - this.notifyError(`Failed connecting to speech vendor IBM: ${reason}`); + this.notifyError({msg: 'ASR error',details:`Failed connecting to speech vendor IBM: ${reason}`}); this.notifyTaskDone(); }