Exception: AhoSdk::ValidationError

Inherits:
ApiError
  • Object
show all
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

Methods inherited from ApiError

#initialize

Constructor Details

This class inherits a constructor from AhoSdk::ApiError

Instance Method Details

#errors_by_fieldObject

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_errorsObject

Returns array of { field:, issue:, hint: } hashes



393
394
395
# File 'lib/aho_sdk/http_client.rb', line 393

def field_errors
  details || []
end