We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Im using faraday and faraday_middleware libraries for the xml response parsing from external API.
Im running this in a multi threaded process Im getting this error when I call object.get.body
object = Faraday.new 'url' do |conn| conn.headers['referer'] = 'referer url' conn.response :xml conn.adapter Faraday.default_adapter end
object = Faraday.new 'url' do |conn|
conn.headers['referer'] = 'referer url'
conn.response :xml
conn.adapter Faraday.default_adapter
end
object.params = {:id => 123}
when I call object.get.body , throws this exception
error backtrace
/usr/local/rvm/gems/ruby-2.2.2/gems/multi_xml-0.5.5/lib/multi_xml.rb:138:in parse' /usr/local/rvm/gems/ruby-2.2.2/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response/parse_xml.rb:9:inblock in class:ParseXml' /usr/local/rvm/gems/ruby-2.2.2/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:48:in call' /usr/local/rvm/gems/ruby-2.2.2/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:48:inparse' /usr/local/rvm/gems/ruby-2.2.2/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:39:in process_response' /usr/local/rvm/gems/ruby-2.2.2/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:32:inblock in call' /usr/local/rvm/gems/ruby-2.2.2/gems/faraday-0.9.1/lib/faraday/response.rb:57:in on_complete' /usr/local/rvm/gems/ruby-2.2.2/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:30:incall' /usr/local/rvm/gems/ruby-2.2.2/gems/faraday-0.9.1/lib/faraday/rack_builder.rb:139:in build_response' /usr/local/rvm/gems/ruby-2.2.2/gems/faraday-0.9.1/lib/faraday/connection.rb:377:inrun_request' /usr/local/rvm/gems/ruby-2.2.2/gems/faraday-0.9.1/lib/faraday/connection.rb:140:in `get'
The text was updated successfully, but these errors were encountered:
This is the code at that version of the middleware:
No options, no nothing:
::MultiXml.parse(body)
https://github.com/lostisland/faraday_middleware/blob/v0.9.1/lib/faraday_middleware/response/parse_xml.rb
(I merely wanted to rule out something that could have been wonky in the old faraday middleware.)
Well, without more details on the actual input that could create this error, this Issue can be closed.
Sorry, something went wrong.
No branches or pull requests
Im using faraday and faraday_middleware libraries for the xml response parsing from external API.
Im running this in a multi threaded process
Im getting this error when I call object.get.body
object = Faraday.new 'url' do |conn|
conn.headers['referer'] = 'referer url'
conn.response :xml
conn.adapter Faraday.default_adapter
end
object.params = {:id => 123}
when I call object.get.body , throws this exception
error backtrace
/usr/local/rvm/gems/ruby-2.2.2/gems/multi_xml-0.5.5/lib/multi_xml.rb:138:in parse' /usr/local/rvm/gems/ruby-2.2.2/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response/parse_xml.rb:9:inblock in class:ParseXml'
/usr/local/rvm/gems/ruby-2.2.2/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:48:in call' /usr/local/rvm/gems/ruby-2.2.2/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:48:inparse'
/usr/local/rvm/gems/ruby-2.2.2/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:39:in process_response' /usr/local/rvm/gems/ruby-2.2.2/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:32:inblock in call'
/usr/local/rvm/gems/ruby-2.2.2/gems/faraday-0.9.1/lib/faraday/response.rb:57:in on_complete' /usr/local/rvm/gems/ruby-2.2.2/gems/faraday_middleware-0.9.1/lib/faraday_middleware/response_middleware.rb:30:incall'
/usr/local/rvm/gems/ruby-2.2.2/gems/faraday-0.9.1/lib/faraday/rack_builder.rb:139:in build_response' /usr/local/rvm/gems/ruby-2.2.2/gems/faraday-0.9.1/lib/faraday/connection.rb:377:inrun_request'
/usr/local/rvm/gems/ruby-2.2.2/gems/faraday-0.9.1/lib/faraday/connection.rb:140:in `get'
The text was updated successfully, but these errors were encountered: