Exception: DataMapperRest::ResourceInvalid
- Inherits:
-
ClientError
- Object
- StandardError
- ConnectionError
- ClientError
- DataMapperRest::ResourceInvalid
- Defined in:
- lib/dm-rest-adapter/exceptions.rb
Overview
422 Unprocessable Entity
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
On this case, we could try to retrieve the validation_errors from message body:.
Attributes inherited from ConnectionError
Instance Method Summary collapse
-
#initialize(response, message = nil) ⇒ ResourceInvalid
constructor
A new instance of ResourceInvalid.
Methods inherited from ConnectionError
Constructor Details
#initialize(response, message = nil) ⇒ ResourceInvalid
Returns a new instance of ResourceInvalid.
51 52 53 54 |
# File 'lib/dm-rest-adapter/exceptions.rb', line 51 def initialize(response, = nil) super(response, ) @body = response.body unless response.body.nil? end |
Instance Attribute Details
#body ⇒ Object (readonly)
On this case, we could try to retrieve the validation_errors from message body:
50 51 52 |
# File 'lib/dm-rest-adapter/exceptions.rb', line 50 def body @body end |