-
Notifications
You must be signed in to change notification settings - Fork 975
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
Unexpected change to Faraday::Error#initialize
signature in 0.17.1
#1090
Comments
Hi @manuelmeurer, sorry to hear this is causing issues! Ideally, we'd like to keep the improvements while maintaining backwards compatibility, so I'll have a look if that's possible. |
@manuelmeurer I had a look at slack-ruby/slack-ruby-client#305 and to be fair, the problem to me seems that you've not followed the best practice on subclassing. In our case, we have extended a method (init) which was accepting a single parameter to accept another optional one. So from a OOP point of view we haven't done anything breaking or backwards incompatible. I'm reluctant at this point to revert our change, hopeful my explanation makes sense to you, but please feel free to come back with any question you might have. For now I'm closing this issue as per the explanation above. |
@iMacTia Yep, you're absolutely right, assigning |
Basic Info
Issue description
From 0.17.0 to 0.17.1, the signature of
Faraday::Error#initialize
changed.In 0.17.0,
Faraday::Error
simply inherited fromStandardError
, andFaraday:: ClientError
inherited fromFaraday::Error
AND added a custominitialize
method that accepts aresponse
parameter.Now in 0.17.1,
Faraday::Error
still inherits fromStandardError
, but also has the custominitialize
method that used to be inFaraday:: ClientError
.This change was done in 6e746fc and doesn't seem to have anything to do with the other changes in the commit.
It might make sense to be able to set the
response
forFaraday::Error
(and all errors inheriting from it), not justFaraday:: ClientError
, but I would have expected this to cause a new minor or even major version release, not just a new patch release.The change creates a problem in https://github.com/slack-ruby/slack-ruby-client:
slack-ruby/slack-ruby-client#305 (comment)
Would you accept a PR that reverts this behavior and release 0.17.2?
The text was updated successfully, but these errors were encountered: