Files
openfoodnetwork/lib/open_food_network/error_logger.rb
2024-11-21 15:58:55 +11:00

16 lines
445 B
Ruby

# frozen_string_literal: true
# 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)
Alert.raise(error)
end
end
end