Exception: ApiAiWrapper::Errors::Engine::ApiError

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, code = nil, status = nil) ⇒ ApiError

Returns a new instance of ApiError.



28
29
30
31
32
# File 'lib/api_ai_wrapper/errors.rb', line 28

def initialize(message = nil, code = nil, status = nil)
  @message = message || "An error occured in API.AI."
  @code = code
  @status = status
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



26
27
28
# File 'lib/api_ai_wrapper/errors.rb', line 26

def code
  @code
end

#statusObject (readonly)

Returns the value of attribute status.



26
27
28
# File 'lib/api_ai_wrapper/errors.rb', line 26

def status
  @status
end