mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-21 17:17:58 +00:00
write service_provider_sid with alerts
This commit is contained in:
@@ -18,8 +18,8 @@ function basicAuth(username, password) {
|
||||
|
||||
|
||||
class HttpRequestor extends BaseRequestor {
|
||||
constructor(logger, account_sid, hook, secret) {
|
||||
super(logger, account_sid, hook, secret);
|
||||
constructor(logger, service_provider_sid, account_sid, hook, secret) {
|
||||
super(logger, service_provider_sid, account_sid, hook, secret);
|
||||
|
||||
this.method = hook.method || 'POST';
|
||||
this.authHeader = basicAuth(hook.username, hook.password);
|
||||
@@ -142,7 +142,7 @@ class HttpRequestor extends BaseRequestor {
|
||||
this.logger.error({err, baseUrl: this.baseUrl, url},
|
||||
'web callback returned unexpected error');
|
||||
}
|
||||
let opts = {account_sid: this.account_sid};
|
||||
let opts = {account_sid: this.account_sid, service_provider_sid: this.service_provider_sid};
|
||||
if (err.code === 'ECONNREFUSED') {
|
||||
opts = {...opts, alert_type: this.Alerter.AlertType.WEBHOOK_CONNECTION_FAILURE, url};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user