# bad_request

> The request could not be read. Guv could not read the request at all, usually because the body is not valid JSON or the content type is missing.

**The request could not be read.** Guv could not read the request at all, usually because the body is not valid JSON or the content type is missing.

- **HTTP status:** `400 Bad Request`
- **CLI exit code:** `2` (the request or file is not valid)
- **Retry:** not as it is; the same request will fail the same way until the cause is fixed

## How to fix it

Send a valid JSON body with Content-Type: application/json.

## Common causes

- A trailing comma or unquoted key in the JSON body.
- Sending form data or plain text without `Content-Type: application/json`.

## What the response looks like

```json
{
  "type": "https://guv.dev/errors/bad_request",
  "title": "The request could not be read",
  "status": 400,
  "code": "bad_request",
  "detail": "Guv could not read the request at all, usually because the body is not valid JSON or the content type is missing.",
  "fix": "Send a valid JSON body with Content-Type: application/json.",
  "docs_url": "https://guv.dev/errors/bad_request",
  "request_id": "req_01jbx2m9k7q4r8t5v6w3y0z1rq"
}
```

The `code` field is stable: match on it, not on `title` or `detail`, which may be reworded.
