From 64626b8b20d0185c30f51ff0987b3e4a4cbf1c21 Mon Sep 17 00:00:00 2001 From: Oleg Hasjanov Date: Fri, 3 Nov 2023 12:04:41 +0200 Subject: [PATCH] add logs for timeout exception --- app/services/notify.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/notify.rb b/app/services/notify.rb index 9442272..3c412cb 100644 --- a/app/services/notify.rb +++ b/app/services/notify.rb @@ -39,6 +39,8 @@ def self.call(response:) parsed_response[:invoice_number_collection] = notifier.invoice_numbers_from_multi_payment(invoice) notifier.put_request(direction: 'services', path: url, params: parsed_response) + rescue Net::ReadTimeout => e + Rails.logger.error "Timeout error: #{e}. path: #{url}, params: #{parsed_response}, class: Notify, method: call" rescue StandardError => e Rails.logger.error e notifier.notify(title: 'Error occur in callback handler', error_message: "Error message #{e}")