Skip to content
Settings

VALIDATION_FAILED — payload fails model schema validation

cyoda-go version 0.6.2

VALIDATION_FAILED — the request payload is structurally valid JSON but fails the model’s schema or workflow validation rules.

HTTP: 400 Bad Request. Retryable: no.

Unlike BAD_REQUEST (which covers parse failures), this error is returned when the payload is parseable but violates the registered model schema — for example, a required field is missing, a value is out of the allowed range, or a workflow guard condition is not satisfied. The error detail includes the specific validation failure.

Correct the payload according to the model’s schema constraints. Review the model definition for required fields, type constraints, and workflow guard conditions.

  • errors
  • errors.BAD_REQUEST
  • errors.POLYMORPHIC_SLOT
  • cyoda help errors — Every error response from the Cyoda REST API carries a structured errorCode in the properties object. Multiple codes may share the same HTTP status. Programmatic handling keys on errorCode, not HTTP status.
  • cyoda help errors BAD_REQUEST — Fired when the server cannot parse or structurally process the incoming request. Common triggers include invalid JSON, missing required fields, unsupported format specifiers, or mutually exclusive parameters being set simultaneously.
  • cyoda help errors POLYMORPHIC_SLOT — A model can define polymorphic slots — fields whose schema varies based on a discriminator value. This error fires when the payload’s discriminator selects a variant whose schema the provided data fails to match, or when the discriminator value itself is unrecognised.