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

Redefine network error class #150

Merged
merged 2 commits into from
Dec 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ PATH
specs:
my_api_client (0.10.2)
activesupport (>= 4.2.0)
faraday (>= 0.17.1)
jsonpath
sawyer (>= 0.8.2)

4 changes: 3 additions & 1 deletion lib/my_api_client/errors.rb
Original file line number Diff line number Diff line change
@@ -27,7 +27,9 @@ def inspect
end

NETWORK_ERRORS = [
Faraday::ClientError,
Faraday::TimeoutError,
Faraday::ConnectionFailed,
Faraday::SSLError,
OpenSSL::SSL::SSLError,
Net::OpenTimeout,
Net::ReadTimeout,
1 change: 1 addition & 0 deletions my_api_client.gemspec
Original file line number Diff line number Diff line change
@@ -23,6 +23,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ['lib']

spec.add_dependency 'activesupport', '>= 4.2.0'
spec.add_dependency 'faraday', '>= 0.17.1'
spec.add_dependency 'jsonpath'
spec.add_dependency 'sawyer', '>= 0.8.2'