Exception: Ki::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- Ki::ApiError
- Defined in:
- lib/ki/utils/api_error.rb
Overview
:nodoc:
Direct Known Subclasses
AttributeNotUnique, ForbiddenAction, InvalidUrlError, PartialNotFoundError, RequiredAttributeMissing, UnauthorizedError
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(body, status = 400) ⇒ ApiError
constructor
A new instance of ApiError.
- #result ⇒ Object
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
#status ⇒ Object (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
#result ⇒ Object
10 11 12 |
# File 'lib/ki/utils/api_error.rb', line 10 def result { 'error' => to_s } end |