From a238148b1d66b9d5377b9c840b00b9e2ea4d4d7e Mon Sep 17 00:00:00 2001 From: Jared Norman Date: Tue, 5 Feb 2019 10:36:04 -0800 Subject: Move exception handler configuration --- lib/super_good/solidus_taxjar/tax_calculator.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/super_good/solidus_taxjar') diff --git a/lib/super_good/solidus_taxjar/tax_calculator.rb b/lib/super_good/solidus_taxjar/tax_calculator.rb index b9e6444..a3c0690 100644 --- a/lib/super_good/solidus_taxjar/tax_calculator.rb +++ b/lib/super_good/solidus_taxjar/tax_calculator.rb @@ -1,11 +1,6 @@ module SuperGood module SolidusTaxJar class TaxCalculator - class_attribute :exception_handler - self.exception_handler = ->(e) { - Rails.logger.error "An error occurred while fetching TaxJar tax rates - #{e}: #{e.message}" - } - def self.default_api ::SuperGood::SolidusTaxJar::API.new end @@ -129,6 +124,10 @@ module SuperGood end end end + + def exception_handler + SuperGood::SolidusTaxJar.exception_handler + end end end end -- cgit v1.2.3