chore: Disable throwing Webhook exceptions to Sentry (#6663)

- There is little value in throwing the third-party webhook-related exceptions to sentry. Let's rather write it to logs instead.
This commit is contained in:
Sojan Jose
2023-03-14 17:40:40 +05:30
committed by GitHub
parent cae3ac94cd
commit abe57873db

View File

@@ -7,10 +7,7 @@ class Webhooks::Trigger
timeout: 5
)
Rails.logger.info "Performed Request: Code - #{response.code}"
rescue *ExceptionList::REST_CLIENT_EXCEPTIONS, URI::InvalidURIError => e
Rails.logger.error "Exception: invalid webhook url #{url} : #{e.message}"
rescue StandardError => e
Rails.logger.error "Exception: invalid webhook url #{url} : #{e.message}"
ChatwootExceptionTracker.new(e).capture_exception
Rails.logger.warn "Exception: invalid webhook url #{url} : #{e.message}"
end
end