mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2026-02-14 18:30:59 +00:00
fix: wrong stt vendor will raise ws notification (#219)
* fix: wrong stt vendor will raise ws notification * fix: wrong stt vendor will raise ws notification Co-authored-by: Quan HL <quan.luuhoan8@gmail.com>
This commit is contained in:
@@ -162,8 +162,10 @@ class TaskGather extends Task {
|
|||||||
alert_type: AlertType.STT_NOT_PROVISIONED,
|
alert_type: AlertType.STT_NOT_PROVISIONED,
|
||||||
vendor: this.vendor
|
vendor: this.vendor
|
||||||
}).catch((err) => this.logger.info({err}, 'Error generating alert for no stt'));
|
}).catch((err) => this.logger.info({err}, 'Error generating alert for no stt'));
|
||||||
|
// Notify application that STT vender is wrong.
|
||||||
throw new Error(`no speech-to-text service credentials for ${this.vendor} have been configured`);
|
this.notifyError(`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`);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logger.info({sttCredentials: this.sttCredentials}, 'Gather:exec - sttCredentials');
|
this.logger.info({sttCredentials: this.sttCredentials}, 'Gather:exec - sttCredentials');
|
||||||
@@ -385,6 +387,8 @@ class TaskGather extends Task {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
this.notifyError(`Invalid vendor ${this.vendor}`);
|
||||||
|
this.notifyTaskDone();
|
||||||
throw new Error(`Invalid vendor ${this.vendor}`);
|
throw new Error(`Invalid vendor ${this.vendor}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user