clean up errors in sentry

This commit is contained in:
Chris
2025-12-12 13:14:55 -08:00
parent 7aaa52828e
commit 47198e0280
2 changed files with 4 additions and 3 deletions

View File

@@ -2,5 +2,6 @@ if ENV['SENTRY_DSN'].present?
Sentry.init do |config|
config.dsn = ENV['SENTRY_DSN']
config.breadcrumbs_logger = [ :active_support_logger, :http_logger ]
config.excluded_exceptions += [ 'ActionDispatch::RemoteIp::IpSpoofAttackError' ]
end
end

View File

@@ -79,7 +79,7 @@ module Portainer
end
rescue Socket::ResolutionError
raise ConnectionError, "Portainer URL is not resolvable"
rescue Net::ReadTimeout
rescue Net::ReadTimeout, Net::OpenTimeout
raise ConnectionError, "Connection to Portainer timed out"
end
@@ -131,7 +131,7 @@ module Portainer
end
rescue Socket::ResolutionError
raise ConnectionError, "Portainer URL is not resolvable"
rescue Net::ReadTimeout
rescue Net::ReadTimeout, Net::OpenTimeout
raise ConnectionError, "Connection to Portainer timed out"
end
@@ -141,7 +141,7 @@ module Portainer
end
rescue Socket::ResolutionError
raise ConnectionError, "Portainer URL is not resolvable"
rescue Net::ReadTimeout
rescue Net::ReadTimeout, Net::OpenTimeout
raise ConnectionError, "Connection to Portainer timed out"
end