Exception: Shikimori::API::BadRequestError
- Inherits:
-
RequestError
- Object
- StandardError
- RequestError
- Shikimori::API::BadRequestError
- Defined in:
- lib/shikimori/api/errors.rb
Overview
Error, when request is bad
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(errors) ⇒ BadRequestError
constructor
A new instance of BadRequestError.
Constructor Details
#initialize(errors) ⇒ BadRequestError
Returns a new instance of BadRequestError.
14 15 16 17 18 |
# File 'lib/shikimori/api/errors.rb', line 14 def initialize(errors) @errors = errors.is_a?(Hash) ? errors['errors'] : errors super("Bad request. Errors:\n\t#{@errors.join("\n\t")}") end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
12 13 14 |
# File 'lib/shikimori/api/errors.rb', line 12 def errors @errors end |