Exception: PaypalAPI::Errors::NetworkError

Inherits:
PaypalAPI::Error show all
Defined in:
lib/paypal-api/error.rb

Overview

Raised when a network raised when executing the request List of network errors can be found in errors/network_error_builder.rb

Instance Attribute Summary

Attributes inherited from PaypalAPI::Error

#error_debug_id, #error_details, #error_message, #error_name, #paypal_request_id, #request, #response

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, request:, error:) ⇒ NetworkError

Returns a new instance of NetworkError.



61
62
63
64
65
66
67
68
69
70
# File 'lib/paypal-api/error.rb', line 61

def initialize(message = nil, request:, error:)
  super(message)
  @request = request
  @response = nil
  @error_name = error.class.name
  @error_message = error.message
  @error_debug_id = nil
  @error_details = nil
  @paypal_request_id = request.http_request["paypal-request-id"]
end