With the introduction of v1.15.0, some errors started appearing on CI builds of a project using this library for tests. The errors are related to the decode_resource method of the http/client.rb, which seem to indicate that response.body is nil.
NoMethodError:
undefined method `empty?' for nil:NilClass
# /bundle/ruby/2.4.0/gems/rabbitmq_http_api_client-1.15.0/lib/rabbitmq/http/client.rb:429:in `decode_resource'
# /bundle/ruby/2.4.0/gems/rabbitmq_http_api_client-1.15.0/lib/rabbitmq/http/client.rb:134:in `delete_exchange'
# ./spec/support/helpers/rabbitmq_management.rb:11:in `block in delete_exchanges'
# ./spec/support/helpers/rabbitmq_management.rb:11:in `each'
# ./spec/support/helpers/rabbitmq_management.rb:11:in `delete_exchanges'
# ./spec/integration/consumer/event_consumer_spec.rb:27:in `block (2 levels) in <top (required)>'
The CI job used faraday 1.3.0, faraday-net_http 1.0.1 and faraday_middleware 1.0.0.
Downgrading this library to v1.14.0 fixed the problem.
With the introduction of v1.15.0, some errors started appearing on CI builds of a project using this library for tests. The errors are related to the decode_resource method of the
http/client.rb, which seem to indicate thatresponse.bodyis nil.rabbitmq_http_api_client/lib/rabbitmq/http/client.rb
Line 429 in 6857697
The CI job used faraday 1.3.0, faraday-net_http 1.0.1 and faraday_middleware 1.0.0.
Downgrading this library to v1.14.0 fixed the problem.