Class: MailchimpAPI::NetworkErrorBuilder Private
- Inherits:
-
Object
- Object
- MailchimpAPI::NetworkErrorBuilder
- Defined in:
- lib/mailchimp-api/network_error_builder.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Internal class for building network error instances
Constant Summary collapse
- ERRORS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
List of network-related error classes that should be wrapped in NetworkError
[ IOError, Errno::ECONNABORTED, Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::EHOSTUNREACH, Errno::EPIPE, Errno::ETIMEDOUT, OpenSSL::SSL::SSLError, SocketError, Timeout::Error # Net::OpenTimeout, Net::ReadTimeout ].freeze
Class Method Summary collapse
-
.call(request:, error:) ⇒ Errors::NetworkError
private
Creates a new network error instance.
Class Method Details
.call(request:, error:) ⇒ Errors::NetworkError
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Creates a new network error instance
27 28 29 |
# File 'lib/mailchimp-api/network_error_builder.rb', line 27 def call(request:, error:) Errors::NetworkError.new(error., request: request, error: error) end |