Exception: ChatWork::APIConnectionError

Inherits:
ChatWorkError
  • Object
show all
Defined in:
lib/chatwork/chatwork_error.rb

Instance Attribute Summary collapse

Attributes inherited from ChatWorkError

#error_response, #status

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ChatWorkError

from_response

Constructor Details

#initialize(message, original_error) ⇒ APIConnectionError

Returns a new instance of APIConnectionError.



38
39
40
41
# File 'lib/chatwork/chatwork_error.rb', line 38

def initialize(message, original_error)
  @original_error = original_error
  super(message)
end

Instance Attribute Details

#original_errorObject (readonly)

Returns the value of attribute original_error.



36
37
38
# File 'lib/chatwork/chatwork_error.rb', line 36

def original_error
  @original_error
end

Class Method Details

.faraday_error(e) ⇒ Object



32
33
34
# File 'lib/chatwork/chatwork_error.rb', line 32

def self.faraday_error(e)
  new("Connection with ChatWork API server failed. #{e.message}", e)
end