-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
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
Don't register the request/response json middleware for Faraday 1.10+ #288
Conversation
Faraday 1.10 ships with an out-of-the-box JSON middleware, so we want to to default to that one rather than the faraday_middleware one.
It looks like the change is sound, but the CI needs a little love.
|
I've updated the CI workflow, hopefully it will work now. |
@iMacTia I pushed changes to get to green, this branch can now be resolved. |
I will resolve the conflict in this PR right now. |
I got excited and extracted the #291 as well, to keep the edits in this change as focused as we can. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
This PR seems to break things for us after all.
and upgrading faraday_middleware from 1.2.0 to 1.2.1 breaks all tests that do some kind of JSON importing. |
@WvanLelyveld do you have an error or, even better, a stacktrace to share? |
Sure. The error message becomes:
The connector.credit_list now fails with the NoMethodError. The credit_list is defined as follows:
This now errors because faraday_response.body is now mocked as a string instead of a hash. |
@iMacTia I've made a test repo with two branches. This should illustrate that this version breaks things in certain case. |
Summary
Faraday 1.10 ships with an out-of-the-box JSON middleware, so we want to to default to that one rather than the faraday_middleware one.
See this comment for more details.