Closed wuarmin closed 1 year ago
~Hi @wuarmin, the error is a bit strange because logging/formatter.rb
should only be used if you also add the :logger
middleware to your connection.~
~1. Is that the whole connection initialisation block or are you leaving out something else?~
~2. Can you share the code for the XMLMiddleware
? Is that a custom middleware?~
EDIT: Actually, I managed to reproduce this, but you need to explicitly enable warnings:
$> irb -W
3.1.2 :001 > require 'faraday'
/Users/mattiagiuffrida/.rvm/gems/ruby-3.1.2/gems/faraday-2.7.1/lib/faraday/logging/formatter.rb:40: warning: method redefined; discarding old error
/Users/mattiagiuffrida/.rvm/rubies/ruby-3.1.2/lib/ruby/3.1.0/forwardable.rb:229: warning: previous definition of error was here
I can see this is happening because of the changes introduced in #1460. Thanks for raising this @wuarmin 🙏 !
Hey!
Basic Info
Issue description
I get following warning
Steps to reproduce
If I execute following code, the warning appears.
Thanks and best regards