Exception: Ki::ApiError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ki/utils/api_error.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body, status = 400) ⇒ ApiError

Returns a new instance of ApiError.



5
6
7
8
# File 'lib/ki/utils/api_error.rb', line 5

def initialize(body, status = 400)
  super body
  @status = status
end

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



3
4
5
# File 'lib/ki/utils/api_error.rb', line 3

def status
  @status
end

Instance Method Details

#resultObject



10
11
12
# File 'lib/ki/utils/api_error.rb', line 10

def result
  { 'error' => to_s }
end