Exception: TrueTrial::ValidationError
- Defined in:
- lib/truetrial/errors.rb
Overview
Raised when request validation fails (HTTP 422).
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(message = "Validation failed", errors: {}, response_body: nil) ⇒ ValidationError
constructor
A new instance of ValidationError.
Constructor Details
#initialize(message = "Validation failed", errors: {}, response_body: nil) ⇒ ValidationError
Returns a new instance of ValidationError.
26 27 28 29 |
# File 'lib/truetrial/errors.rb', line 26 def initialize( = "Validation failed", errors: {}, response_body: nil) @errors = errors super(, status_code: 422, response_body: response_body) end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
24 25 26 |
# File 'lib/truetrial/errors.rb', line 24 def errors @errors end |