Skip to content

Commit

Permalink
add logs for timeout exception
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegPhenomenon committed Nov 3, 2023
1 parent dd027b5 commit 64626b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/services/notify.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit 64626b8

Please sign in to comment.