From 7718f5087764bda53a9b3a68f39dec29f6aa50dd Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Thu, 30 Nov 2023 13:29:39 -0500 Subject: [PATCH] report aws stt errors --- lib/tasks/gather.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/tasks/gather.js b/lib/tasks/gather.js index 8aa1bdc9..6a87441b 100644 --- a/lib/tasks/gather.js +++ b/lib/tasks/gather.js @@ -824,10 +824,11 @@ class TaskGather extends SttTask { if (code === 413 && error === 'Too much speech') return this._resolve('timeout'); } this.logger.info({evt}, 'TaskGather:_onJambonzError'); + const errMessage = evt.error || evt.Message; writeAlerts({ account_sid: cs.accountSid, alert_type: AlertType.STT_FAILURE, - message: `Custom speech vendor ${this.vendor} error: ${evt.error}`, + message: `Custom speech vendor ${this.vendor} error: ${errMessage}`, vendor: this.vendor, }).catch((err) => this.logger.info({err}, 'Error generating alert for jambonz custom connection failure')); this.notifyError({msg: 'ASR error', details:`Custom speech vendor ${this.vendor} error: ${evt.error}`});