From 5f67285f1e8ade6c31db4539845d4d51792bb2be Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Tue, 30 Apr 2024 07:59:18 -0400 Subject: [PATCH] ignore google errors with error_code 0 (#722) --- lib/tasks/gather.js | 4 ++++ lib/tasks/transcribe.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/tasks/gather.js b/lib/tasks/gather.js index 644dfb48..00c96a9d 100644 --- a/lib/tasks/gather.js +++ b/lib/tasks/gather.js @@ -934,6 +934,10 @@ class TaskGather extends SttTask { } async _onJambonzError(cs, ep, evt) { + if (this.vendor === 'google' && evt.error_code === 0) { + this.logger.info({evt}, 'TaskTranscribe:_onJambonzError - ignoring google error code 0'); + return; + } this.logger.info({evt}, 'TaskGather:_onJambonzError'); const {writeAlerts, AlertType} = cs.srf.locals; if (this.vendor === 'nuance') { diff --git a/lib/tasks/transcribe.js b/lib/tasks/transcribe.js index 21097a33..a078e589 100644 --- a/lib/tasks/transcribe.js +++ b/lib/tasks/transcribe.js @@ -549,6 +549,10 @@ class TaskTranscribe extends SttTask { } async _onJambonzError(cs, _ep, evt) { + if (this.vendor === 'google' && evt.error_code === 0) { + this.logger.info({evt}, 'TaskTranscribe:_onJambonzError - ignoring google error code 0'); + return; + } this.logger.info({evt}, 'TaskTranscribe:_onJambonzError'); if (this.paused) return; const {writeAlerts, AlertType} = cs.srf.locals;