Exception: HalApi::Errors::ApiError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/hal_api/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, status = nil, hint = nil) ⇒ ApiError

Returns a new instance of ApiError.



9
10
11
12
13
# File 'lib/hal_api/errors.rb', line 9

def initialize(message = nil, status = nil, hint = nil)
  super(message || "API Error")
  self.status = status || 500
  self.hint = hint
end

Instance Attribute Details

#hintObject

Returns the value of attribute hint.



7
8
9
# File 'lib/hal_api/errors.rb', line 7

def hint
  @hint
end

#statusObject

Returns the value of attribute status.



6
7
8
# File 'lib/hal_api/errors.rb', line 6

def status
  @status
end