mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
This may lead to more error reports than we want to see. A not existing email address may cause Bugsnag to be notified. If this happens, we can rescue form these specific errors and only report the rest.
14 lines
417 B
Ruby
14 lines
417 B
Ruby
# Our error logging API currently wraps Bugsnag.
|
|
# It makes us more flexible if we wanted to replace Bugsnag or change logging
|
|
# behaviour.
|
|
module OpenFoodNetwork
|
|
module ErrorLogger
|
|
# Tries to escalate the error to a developer.
|
|
# If Bugsnag is configured, it will notify it. It would be nice to implement
|
|
# some kind of fallback.
|
|
def self.notify(error)
|
|
Bugsnag.notify(error)
|
|
end
|
|
end
|
|
end
|