Exception: ChatWork::APIConnectionError
- Inherits:
 - 
      ChatWorkError
      
        
- Object
 - StandardError
 - ChatWorkError
 - ChatWork::APIConnectionError
 
 
- Defined in:
 - lib/chatwork/chatwork_error.rb
 
Instance Attribute Summary collapse
- 
  
    
      #original_error  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute original_error.
 
Attributes inherited from ChatWorkError
Class Method Summary collapse
Instance Method Summary collapse
- 
  
    
      #initialize(message, original_error = nil)  ⇒ APIConnectionError 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of APIConnectionError.
 
Methods inherited from ChatWorkError
Constructor Details
#initialize(message, original_error = nil) ⇒ APIConnectionError
Returns a new instance of APIConnectionError.
      40 41 42 43 44 45 46 47 48  | 
    
      # File 'lib/chatwork/chatwork_error.rb', line 40 def initialize(, original_error = nil) @original_error = original_error if original_error && original_error.response.is_a?(Hash) super(, original_error.response[:status], original_error.response[:body]) else super() end end  | 
  
Instance Attribute Details
#original_error ⇒ Object (readonly)
Returns the value of attribute original_error.
      38 39 40  | 
    
      # File 'lib/chatwork/chatwork_error.rb', line 38 def original_error @original_error end  | 
  
Class Method Details
.faraday_error(e) ⇒ Object
      34 35 36  | 
    
      # File 'lib/chatwork/chatwork_error.rb', line 34 def self.faraday_error(e) new("Connection with ChatWork API server failed. #{e.}", e) end  |