Exception: Assinafy::ValidationError
- Defined in:
- lib/assinafy/errors.rb,
sig/assinafy.rbs
Overview
Raised before a network request is made when the caller's input is invalid (missing IDs, wrong shape, etc.).
Instance Attribute Summary collapse
-
#errors ⇒ Hash
readonly
Field-keyed validation details.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(message = 'Validation failed', errors = {}) ⇒ ValidationError
constructor
A new instance of ValidationError.
Constructor Details
#initialize(message = 'Validation failed', errors = {}) ⇒ ValidationError
Returns a new instance of ValidationError.
74 75 76 77 |
# File 'lib/assinafy/errors.rb', line 74 def initialize( = 'Validation failed', errors = {}) super(, { errors: errors }) @errors = errors || {} end |
Instance Attribute Details
#errors ⇒ Hash (readonly)
Returns field-keyed validation details.
72 73 74 |
# File 'lib/assinafy/errors.rb', line 72 def errors @errors end |