class MyApiClient::NetworkError
Raises it when occurred to some network error
Attributes
original_error[R]
Public Class Methods
new(params, original_error)
click to toggle source
Initialize the error class
@param params [MyApiClient::Params::Params]
The request and response parameters
@param original_error
[StandardError]
Some network error
Calls superclass method
MyApiClient::Error::new
# File lib/my_api_client/errors/network_error.rb, line 24 def initialize(params, original_error) @original_error = original_error super params, original_error.message end
Public Instance Methods
inspect()
click to toggle source
Returns contents as string for to be readable for human
@return [String] Contents as string
# File lib/my_api_client/errors/network_error.rb, line 32 def inspect { error: original_error, params: params }.inspect end
metadata()
click to toggle source
Generate metadata for bugsnag.
@return [Hash] Metadata for bugsnag
Calls superclass method
# File lib/my_api_client/errors/network_error.rb, line 39 def metadata super.merge(original_error: original_error.inspect) end