mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-19 04:17:44 +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,
|
||||
vendor: this.vendor
|
||||
}).catch((err) => this.logger.info({err}, 'Error generating alert for no stt'));
|
||||
|
||||
throw new Error(`no speech-to-text service credentials for ${this.vendor} have been configured`);
|
||||
// Notify application that STT vender is wrong.
|
||||
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');
|
||||
@@ -385,6 +387,8 @@ class TaskGather extends Task {
|
||||
break;
|
||||
|
||||
default:
|
||||
this.notifyError(`Invalid vendor ${this.vendor}`);
|
||||
this.notifyTaskDone();
|
||||
throw new Error(`Invalid vendor ${this.vendor}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user