Exception: Amply::Exceptions::ValidationException
- Inherits:
-
StandardError
- Object
- StandardError
- Amply::Exceptions::ValidationException
- Defined in:
- lib/amply/exceptions/validation_exception.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(response) ⇒ ValidationException
constructor
A new instance of ValidationException.
- #message ⇒ Object
Constructor Details
#initialize(response) ⇒ ValidationException
Returns a new instance of ValidationException.
8 9 10 11 12 |
# File 'lib/amply/exceptions/validation_exception.rb', line 8 def initialize(response) @errors = JSON.parse(response.body, symbolize_names: true)[:errors] super end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
6 7 8 |
# File 'lib/amply/exceptions/validation_exception.rb', line 6 def errors @errors end |
Instance Method Details
#message ⇒ Object
14 15 16 |
# File 'lib/amply/exceptions/validation_exception.rb', line 14 def 'A validation error occurred while making an API request' end |