Skip to content
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

Closed

Conversation

tomerpar133
Copy link

Problem:
Error when Faraday::ClientError.new(nil)

Solution
added try to the response hash on FaradayServerError

@dangerpr-bot
Copy link

1 Warning
⚠️ Unless you’re refactoring existing code, please update CHANGELOG.md.

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

@dblock
Copy link
Collaborator

dblock commented Oct 15, 2018

For rubocop, rubocop -a ; rubocop --auto-gen-config.

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)
Copy link
Collaborator

@yuki24 yuki24 Oct 15, 2018

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.

@dblock
Copy link
Collaborator

dblock commented Oct 15, 2018

#51

@neroleung
Copy link
Contributor

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.

@dblock
Copy link
Collaborator

dblock commented Nov 8, 2019

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.

@neroleung
Copy link
Contributor

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~

@dblock
Copy link
Collaborator

dblock commented Nov 14, 2019

Closed via #68.

@dblock dblock closed this Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants