Validation Error
URI: https://docs.ankatech.co/errors/validation
HTTP Status: 400 Bad Request
When you see this
Your request payload was syntactically valid JSON (or form‐data) but failed one or more deeper bean-validation or binding rules. This typically happens when Spring’s @Valid
or @Validated
annotations detect missing or malformed fields after JSON parsing succeeds.
Common Causes
- Missing or blank fields annotated with
@NotNull
,@NotBlank
,@NotEmpty
, or@Size
. - Numeric values outside their allowed range (
@Min
/@Max
). - Date or string formats that don’t match
@Past
,@Future
, or@Pattern
constraints. - Constraint violations on custom cross-field rules (
@Constraint
on a DTO). - Multipart/form-data errors: required file part missing or empty (e.g. encryption payload).
- Malformed Base64 in fields decoded by the controller (
Invalid Base64 in 'publicKey'
, etc.). - Missing required request parts in streaming endpoints (
metadata
orfile
part absent).
How to Resolve
- Inspect the response detail—it will list each field and the specific validation failure.
- Correct your payload so that every required field is present and satisfies its annotation constraints.
- Resubmit your request.
If you continue to see 400 errors after these steps, please consult the full
API Reference