From 8f00056559707ea88d41f6215c719a7a81ee91bc Mon Sep 17 00:00:00 2001 From: Anton-Ivanov Date: Mon, 22 Jul 2024 21:46:53 +0300 Subject: [PATCH] 1516, do not raise error when Node return not found Within Jobs::CallsMonitoring job we execute the terminate_calls! method and within this method sometime Node returns "not found" response and in this case do not raise error NodeApi::Error and no not send exception in Sentry. --- app/jobs/jobs/calls_monitoring.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/jobs/jobs/calls_monitoring.rb b/app/jobs/jobs/calls_monitoring.rb index 4c5e53e7d..ae8608943 100644 --- a/app/jobs/jobs/calls_monitoring.rb +++ b/app/jobs/jobs/calls_monitoring.rb @@ -406,6 +406,8 @@ def terminate_calls! begin node_id = call[:node_id].to_i nodes[node_id].drop_call(local_tag) + rescue NodeApi::Error => e + logger.error "#{e.class} #{e.message}" rescue StandardError => e node_id = call.is_a?(Hash) ? call[:node_id] : nil capture_error(e, extra: { local_tag: local_tag, node_id: node_id })