Exception: RubyPayler::NetworkError

Inherits:
Error
  • Object
show all
Defined in:
lib/ruby_payler/errors.rb

Overview

Network Error (Faraday exception)

Instance Method Summary collapse

Constructor Details

#initialize(faraday_error) ⇒ NetworkError

Returns a new instance of NetworkError.



63
64
65
# File 'lib/ruby_payler/errors.rb', line 63

def initialize(faraday_error)
  @faraday_error = faraday_error
end

Instance Method Details

#codeObject



67
68
69
# File 'lib/ruby_payler/errors.rb', line 67

def code
  'NetworkError'
end

#messageObject



71
72
73
# File 'lib/ruby_payler/errors.rb', line 71

def message
  @faraday_error.inspect
end

#to_sObject



75
76
77
# File 'lib/ruby_payler/errors.rb', line 75

def to_s
  "NetworkError occured while performing request to Payler: #{message}"
end