Skip to content

request.invalid

The request does not match the route's schema

Type https://mthds.ai/errors/request.invalid
Family request: The HTTP request itself, before any run.
Domain input: the caller acts, by changing the request or its inputs
Retry no: repeating the operation fails the same way
HTTP status 422
Raised as a problem document, sent as the body of an HTTP response or kept in a run's record

What it means

The body parses, but a field fails the route's schema. A problem with several such faults carries one item per fault in errors, each naming its field in location.field. The protocol's refusals of one hash given twice with different sizes, of a blob upload whose bytes differ from the hash in its path, and of an undefined ?type= category on GET /models are this code.

What to do

Read each fault's location.field, compare the request with the route's schema in the protocol's OpenAPI document, correct the request and send it again.

Next steps

A problem carries the step aimed at whoever reads it: the first when its reader is the domain's actor, the caller, and the second for any other reader.

Reader Kind Detail
The domain's actor change_input Correct the field '{field}' as the route's schema requires, then send the request again.
Any other reader change_input Pass this to the caller, who must correct the field '{field}' of the request.

Detail

The problem's detail is written from this template, filled with the occurrence's parameters:

The request's field '{field}' does not match the route's schema.

Parameters

Every parameter is present on every occurrence of the code.

Name Type Description
field identifier The field of the request body that fails the route's schema, as a dotted path.

See also