Skip to content

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.

On the Admin API the same type answers a path or query parameter that is missing, cannot be converted to its declared type, or fails its constraint — a roleName or locale that does not match its pattern, for example — whether or not the controller is @Validated. The detail names the operation and the parameter (listRoleTranslations.locale: Invalid locale format) and never repeats the value you sent. A page request outside a paginated list's bounds is Invalid Input instead.

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 or file part absent).

How to Resolve

  1. Inspect the response detail—it will list each field and the specific validation failure.
  2. Correct your payload so that every required field is present and satisfies its annotation constraints.
  3. Resubmit your request.

If you continue to see 400 errors after these steps, please consult the full
Developer Hub Reference