Error: validation_error

A request field is missing, malformed, or out of range.

validation_error

HTTP status: 400

A field in the request body or query string is missing, malformed, or out of range. The param field is a JSON pointer to the exact field at fault.

Why this happens

  • A required field was omitted (for v3 prequalify, one of applicant, coverage, or products).
  • A money field was sent as a float or a string instead of integer minor units (face_amount_cents is an integer count of cents).
  • An enum value is not one of the accepted values (e.g. sex outside male / female).
  • A cursor was replayed against a different endpoint than the one that minted it — see Pagination.

What to do

  1. Read param — it is a JSON pointer (/coverage/face_amount_cents) to the failing field.
  2. Read detail — it names what was wrong with that field's value.
  3. Fix the field and resend. This is a deterministic 4xx; retrying the same body fails the same way.

Example response

{
  "type": "https://zyins.isaapi.com/errors/validation-error",
  "title": "Request validation failed",
  "status": 400,
  "detail": "coverage.face_amount_cents must be a positive integer count of cents; received \"25000.00\".",
  "code": "validation_error",
  "param": "/coverage/face_amount_cents",
  "request_id": "req_01HZK2N5GQR9T8X4B6FJW3Y1AS"
}

SDK exceptions

LanguageException class
TypeScriptIsaValidationError
PythonIsaValidationError
Go*zyins.ValidationError
PHPIsa\Sdk\Zyins\Exception\IsaValidationException
C#IsaValidationException

See also