validation_failed (422)

The body parsed as JSON, and a field failed the schema.

Cause

Every request is validated against the published contract before anything runs. A field of the wrong type, a value outside its range, or a key options does not declare is refused here. options is a strict object, so a misspelled option is never silently ignored.

The message names the offending path and what was expected.

The message

The wording depends on which of the cases above it was.

/options/mode: Invalid option: expected one of "full"
The accept-version header is not part of this API. There is one response shape; remove the header.

The fix

Read the path in the message and fix that field. The types, the defaults and the ranges are on scan options and in the generated endpoint reference.

Several issues are reported at once, joined by ; .

event_id

event_id is always null on this code. It is a refusal the caller is meant to handle, so nothing is recorded as a failure to look at. The service answers and writes one log line.

The whole catalogue, grouped by what a caller does with it, is on errors.

The response

{
  "error": {
    "code": "validation_failed",
    "message": "/options/mode: Invalid option: expected one of \"full\"",
    "docs_url": "https://doc.cheap/docs/errors/validation_failed",
    "request_id": "req_9e6b1f7c-2d4a-4b83-9c51-7f0ad3e8b642",
    "event_id": null
  }
}