# request_invalid

> The request can't be read

- Status: 400 Bad Request
- Returned by: /api/public
- Operations: [createOrder](https://developers.rivr.io/reference/api-public/createOrder.md), [sendOrderToDevice](https://developers.rivr.io/reference/api-public/sendOrderToDevice.md), [createOnboardingLink](https://developers.rivr.io/reference/api-public/createOnboardingLink.md), [getOnboardingLinks](https://developers.rivr.io/reference/api-public/getOnboardingLinks.md), [listOrderSettlements](https://developers.rivr.io/reference/api-public/listOrderSettlements.md), [getOrderSettlement](https://developers.rivr.io/reference/api-public/getOrderSettlement.md), [getNextUnreadSettlement](https://developers.rivr.io/reference/api-public/getNextUnreadSettlement.md), [createSubscription](https://developers.rivr.io/reference/api-public/createSubscription.md), [getSubscription](https://developers.rivr.io/reference/api-public/getSubscription.md)
- Retry (`retryWhen`): `after_fix`
- Did anything happen? (`outcome`): `none` (It did not happen)
- The request
- Page in the portal: https://developers.rivr.io/errors/request_invalid
- Try it: `GET https://developers.rivr.io/errors/simulate/request_invalid` answers with the code's exact wire form; `?succeedAfter=N&attempt=K` gives a 200 once `attempt` passes `N`

## What it means

The request was refused before the operation ran: the body is empty or not valid JSON, a value has the wrong type, a required field is missing or `null`, or a path id isn't a UUID where the operation reads it as one. The answer is the framework's validation problem, with `errors` per field and `traceId`. Nothing was done.

## What your system does

Fix the fields `errors` points to and send again. The same call gets the same answer.

## Is it worth retrying?

No, not without changing the call.

`retryWhen`: `after_fix`. Change the request first, as the code's page says: a value, the token, a header or a new key. Then send it.

## Did anything happen?

`outcome`: `none`. **It did not happen.** This call did not do what you asked for and changed nothing else that you can see or that concerns money. Where the code has an `outcomeNote`, it takes precedence.

## More members in the response

- `errors`: The messages per field.
- `traceId`: The call's trace id in the monolith.

## Example: /api/public

```http
HTTP/1.1 400 Bad Request
Content-Type: application/json

{
  "type": "https://developers.rivr.io/errors/request_invalid",
  "title": "One or more validation errors occurred.",
  "status": 400,
  "errors": {
    "$": [
      "Expected depth to be zero at the end of the JSON payload. There is an open JSON object or array that should be closed. Path: $ | LineNumber: 0 | BytePositionInLine: 1."
    ],
    "createSubscriptionRequest": [
      "The createSubscriptionRequest field is required."
    ]
  },
  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-00",
  "code": "request_invalid",
  "message": "The request could not be read: a field is missing, null or of the wrong type, or the JSON is malformed. errors lists the fields."
}
```

The `title`, `detail`, `message` and `error_description` texts are exactly as the API writes them today.
