Skip to content

armgit / maybe

Public Imported from GitHub
0

The personal finance app for everyone

Adjust Sentry missing price and rate to warning level

Zach Gollwitzer35d144749405
diff --git a/app/models/exchange_rate/syncer.rb b/app/models/exchange_rate/syncer.rb
index 1f73bc8e..a1ee44b5 100644
--- a/app/models/exchange_rate/syncer.rb
+++ b/app/models/exchange_rate/syncer.rb
@@ -121,7 +121,7 @@ class ExchangeRate::Syncer
else
message = "#{exchange_rate_provider.class.name} could not fetch exchange rate pair from: #{from} to: #{to} between: #{effective_start_date} and: #{Date.current}. Provider error: #{provider_response.error.message}"
Rails.logger.warn(message)
- Sentry.capture_exception(MissingExchangeRateError.new(message))
+ Sentry.capture_exception(MissingExchangeRateError.new(message), level: :warning)
{}
end
end
diff --git a/app/models/security/price/syncer.rb b/app/models/security/price/syncer.rb
index dbdf0831..824998cd 100644
--- a/app/models/security/price/syncer.rb
+++ b/app/models/security/price/syncer.rb
@@ -77,7 +77,7 @@ class Security::Price::Syncer
else
msg = "#{security_provider.class.name} could not fetch prices for #{security.ticker} between #{provider_fetch_start_date} and #{end_date}. Provider error: #{response.error.message}"
Rails.logger.warn(msg)
- Sentry.capture_exception(MissingSecurityPriceError.new(msg))
+ Sentry.capture_exception(MissingSecurityPriceError.new(msg), level: :warning)
{}
end
end