Closed neroleung closed 4 years ago
Oh one thing. You should add an UPGRADING document in this PR like this one because this does change the interface. If someone was handling the Faraday error they now get a ServerError.
@dblock, I've updated CHANGELOG.md and README.md. Also added UPGRADING.md. Question though, do you want a new section in README.md like https://github.com/dblock/slack-ruby-client#stable-release?
This is perfect, thank you. Feel free to PR something linking to UPGRADING.
Thanks. This should close https://github.com/ashkan18/graphlient/issues/51, https://github.com/ashkan18/graphlient/pull/52 and https://github.com/ashkan18/graphlient/pull/59 once a new version is released.
I'll cut a release unless @yuki24 or @ashkan18 can beat me to it (please).
thanks @neroleung ! this is awesome! going to cut the release, hopefully before @dblock 😄
alright 0.3.7
is now published.
This is essentially https://github.com/ashkan18/graphlient/pull/59 with test.
Whenever there is an
Errno::ECONNREFUSED error
, Faraday wraps it in aFaraday::ConnectionFailed
error. Since it inheritsFaraday::ClientError
without a response (see errors/faraday_server_error.rb), the code would return aNoMethodError: undefined method []' for nil:NilClass
error.So basically the fix is to rescue
Faraday::ConnectionFailed
before rescuingFaraday::ClientError
so that we can raise a more meaningful error.Result: