Exception: AhoSdk::ValidationError
- Defined in:
- lib/aho_sdk/http_client.rb
Instance Attribute Summary
Attributes inherited from ApiError
#details, #error_code, #raw_body, #request_id, #status_code
Instance Method Summary collapse
-
#errors_by_field ⇒ Object
Group errors by field name for convenience.
-
#field_errors ⇒ Object
Returns array of { field:, issue:, hint: } hashes.
Methods inherited from ApiError
Constructor Details
This class inherits a constructor from AhoSdk::ApiError
Instance Method Details
#errors_by_field ⇒ Object
Group errors by field name for convenience
398 399 400 |
# File 'lib/aho_sdk/http_client.rb', line 398 def errors_by_field field_errors.group_by { |e| e[:field] } end |
#field_errors ⇒ Object
Returns array of { field:, issue:, hint: } hashes
393 394 395 |
# File 'lib/aho_sdk/http_client.rb', line 393 def field_errors details || [] end |