Exception: Algolia::AlgoliaHttpError
- Inherits:
 - 
      AlgoliaError
      
        
- Object
 - StandardError
 - AlgoliaError
 - Algolia::AlgoliaHttpError
 
 
- Defined in:
 - lib/algolia/error.rb
 
Overview
An exception class raised when the REST API returns an error. The error code and message will be parsed out of the HTTP response, which is also included in the response attribute.
Instance Attribute Summary collapse
- 
  
    
      #code  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute code.
 - 
  
    
      #message  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute message.
 
Instance Method Summary collapse
- 
  
    
      #initialize(code, message)  ⇒ AlgoliaHttpError 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of AlgoliaHttpError.
 
Constructor Details
#initialize(code, message) ⇒ AlgoliaHttpError
Returns a new instance of AlgoliaHttpError.
      32 33 34 35 36  | 
    
      # File 'lib/algolia/error.rb', line 32 def initialize(code, ) self.code = code self. = super("#{self.code()}: #{self.()}") end  | 
  
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
      30 31 32  | 
    
      # File 'lib/algolia/error.rb', line 30 def code @code end  | 
  
#message ⇒ Object
Returns the value of attribute message.
      30 31 32  | 
    
      # File 'lib/algolia/error.rb', line 30 def @message end  |