Exception: ApiAiWrapper::Errors::Engine::MissingToken

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Error

#to_s

Constructor Details

#initialize(message = nil) ⇒ MissingToken

Returns a new instance of MissingToken.



19
20
21
22
# File 'lib/api_ai_wrapper/errors.rb', line 19

def initialize(message = nil)
  @message = message || "Unauthorized call."
  @code = 401
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



17
18
19
# File 'lib/api_ai_wrapper/errors.rb', line 17

def code
  @code
end