Exception: ChatWork::AuthenticateError
- Inherits:
 - 
      ChatWorkError
      
        
- Object
 - StandardError
 - ChatWorkError
 - ChatWork::AuthenticateError
 
 
- Defined in:
 - lib/chatwork/chatwork_error.rb
 
Instance Attribute Summary collapse
- 
  
    
      #error  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute error.
 - 
  
    
      #error_description  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute error_description.
 
Attributes inherited from ChatWorkError
Class Method Summary collapse
Instance Method Summary collapse
- 
  
    
      #initialize(message, status, error_response, error, error_description)  ⇒ AuthenticateError 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of AuthenticateError.
 
Methods inherited from ChatWorkError
Constructor Details
#initialize(message, status, error_response, error, error_description) ⇒ AuthenticateError
Returns a new instance of AuthenticateError.
      63 64 65 66 67 68  | 
    
      # File 'lib/chatwork/chatwork_error.rb', line 63 def initialize(, status, error_response, error, error_description) @error = error @error_description = error_description super(, status, error_response) end  | 
  
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
      61 62 63  | 
    
      # File 'lib/chatwork/chatwork_error.rb', line 61 def error @error end  | 
  
#error_description ⇒ Object (readonly)
Returns the value of attribute error_description.
      61 62 63  | 
    
      # File 'lib/chatwork/chatwork_error.rb', line 61 def error_description @error_description end  | 
  
Class Method Details
.from_www_authenticate(www_authenticate:, status:, error_response:) ⇒ Object
      70 71 72 73 74 75 76 77 78 79 80 81 82 83 84  | 
    
      # File 'lib/chatwork/chatwork_error.rb', line 70 def self.from_www_authenticate(www_authenticate:, status:, error_response:) www_authenticate =~ /error="([^"]+)"/ error = Regexp.last_match(1) www_authenticate =~ /error_description="([^"]+)"/ error_description = Regexp.last_match(1) AuthenticateError.new( www_authenticate, status, error_response, error, error_description, ) end  |