-
Notifications
You must be signed in to change notification settings - Fork 44
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
Fix NoAMethodError in FaradayServerError #52
Conversation
Here's an example of a CHANGELOG.md entry: * [#52](https://github.com/ashkan18/graphlient/pull/52): Fix noamethoderror in faradayservererror - [@tomerpar133](https://github.com/tomerpar133). Generated by 🚫 Danger |
For rubocop, Needs tests. Needs changelog. Thanks. |
@response = inner_exception.response[:body] | ||
@status_code = inner_exception.response[:status] | ||
@response = inner_exception.response.try(:[],:body) | ||
@status_code = inner_exception.response.try(:[],:status) |
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.
The #try
method is a method defined by ActiveSupport and Graphlient doesn't depend on it.
I do not agree with the original author on certain things so I decided to keep working on my own fork until the main branch is fixed. But in the meantime if any of you really need a fix on this soon, check out https://github.com/neroleung/graphlient. |
What are these things you don't agree with @neroleung? This library is written and maintained by a bunch of people, we're happy to discuss anything and help you contribute to the parent repo rather than fork away. |
My apologies. My project has a tight deadline and whether this bug can be fixed quickly or not determines if I need to drop this gem in my project. I didn't expect quick responses and reviews like you all did in open source repos. So I got anxious. I'll make new PRs and fix things up in stages like you all suggested. Thanks~ |
Closed via #68. |
Problem:
Error when Faraday::ClientError.new(nil)
Solution
added try to the response hash on FaradayServerError