From a4c083988296ecb1eea6ab393039d3963a06951a Mon Sep 17 00:00:00 2001 From: Sam Machin Date: Wed, 11 Dec 2024 17:34:44 +0000 Subject: [PATCH] catch error (#1002) * catch error * remove notifyTaskDone --- .gitignore | 3 ++- lib/tasks/sip_refer.js | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d45abdab2..bbb7837e2 100644 --- a/.gitignore +++ b/.gitignore @@ -42,4 +42,5 @@ ecosystem.config.js test/credentials/*.json run-tests.sh run-coverage.sh -.vscode \ No newline at end of file +.vscode +.env diff --git a/lib/tasks/sip_refer.js b/lib/tasks/sip_refer.js index 580befeab..3b307517f 100644 --- a/lib/tasks/sip_refer.js +++ b/lib/tasks/sip_refer.js @@ -94,7 +94,10 @@ class TaskSipRefer extends Task { } if (status >= 200) { this.referSpan.setAttributes({'refer.finalNotify': status}); - await this.performAction({refer_status: 202, final_referred_call_status: status}); + await this.performAction({refer_status: 202, final_referred_call_status: status}) + .catch((err) => { + this.logger.error(err, 'TaskSipRefer:exec - error performing action finalNotify'); + }); this.notifyTaskDone(); } }