From 1845e810c1e2cd8c52d491a09fedf05e74dd0e94 Mon Sep 17 00:00:00 2001 From: Breno Gazzola Date: Sun, 5 May 2024 17:56:47 -0300 Subject: [PATCH] Rescue errors --- app/helpers/vitals_image/tag_helper.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/helpers/vitals_image/tag_helper.rb b/app/helpers/vitals_image/tag_helper.rb index f9bc626..2ed8e1a 100644 --- a/app/helpers/vitals_image/tag_helper.rb +++ b/app/helpers/vitals_image/tag_helper.rb @@ -14,6 +14,9 @@ def vitals_image_tag(source, options = {}) url = vitals_image_url(optimizer.src, optimizer.html_options) image_tag url, optimizer.html_options end + rescue StandardError => error + Sentry.capture_exception(error) if Rails.env.production? + image_tag Base::TINY_GIF end def vitals_image_url(source, options = {})