# werkzeug.exceptions.BadRequest: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.

- **ID:** `python/flask-json-decode-bad-request`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

`request.get_json()` was called on a request without `Content-Type: application/json` or with malformed JSON.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 2.x | active | — | — |
| 3.x | active | — | — |

## Workarounds

1. **** (93% success)
   ```
   data = request.get_json(silent=True) or {}
if not data:
    return jsonify(error='invalid json'), 400
   ```
2. **** (95% success)
   ```
   requests.post(url, json={'k': 'v'})  # sets application/json automatically
   ```

## Dead Ends

- **** — Output formatting config, not input parsing. (95% fail)
- **** — Silently accepts malformed input, masks client bugs. (80% fail)
