Errors
Shape
Every failure has the same envelope. Match on error.code: the message is a fixed text for the
code, and it can change.
error.fields is null, except for request validation (422, code 4200), which lists one entry per rejected field:
Always log X-Request-ID. Every response returns it, and it is what lets us find your exact
request. Send your own as a UUID, or we create one.
Codes
404 is also the answer for another account’s search, so one account can never learn that a
request_id exists for another.
A failed search is not an error response
When a search itself fails, the poll answers 200 with status: "FAILED" and an error object that
holds the code (5021 or 5000), a message and refunded. See
How a search works.
422 in detail
A 422 can mean:
Idempotency-Keyis missing or is not a UUID.objectiveis blank, longer than 2,048 characters or 8,192 bytes, or holds a disallowed control character.request_idis missing or is not a UUID.- The body holds a field the API does not know.

