a = Infusionsoft.new(:api_key => "Asdf", :api_logger => Logger.new("#{Rails.root}/log/infusionsoft_api.log"))
res = a.contact_add({:FirstName => 'first_name', :LastName => 'last_name', :Email => 'test@test.com'})
Expected to get an error as invalid api_key, etc....
However:-
Error is generated and not entered into the infusionsoft_api.log
api_logger method not found.
Do have a fix, do not know if it is good enough though.
in connection.rb class InfusionAPIError < StandardError add include Infusionsoft::Configuration
Then the log does not show the error. my fix for that is
in connection.rb add
api_logger.error "ERROR: #{e.to_s}" before raise InfusionAPIError.new(e.to_s, e)
a = Infusionsoft.new(:api_key => "Asdf", :api_logger => Logger.new("#{Rails.root}/log/infusionsoft_api.log")) res = a.contact_add({:FirstName => 'first_name', :LastName => 'last_name', :Email => 'test@test.com'}) Expected to get an error as invalid api_key, etc.... However:- Error is generated and not entered into the infusionsoft_api.log api_logger method not found.