# fastapi.exceptions.RequestValidationError: 1 validation error for Request
query -> page
  Input should be a valid integer, unable to parse string as an integer

- **ID:** `python/fastapi-request-validation-query`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A query parameter declared as int received a non-numeric string (often empty or 'abc') from the client.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 0.100+ | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   from fastapi import Query
@app.get('/items')
async def items(page: int = Query(1, ge=1)): ...
   ```
2. **** (85% success)
   ```
   @app.exception_handler(RequestValidationError)
async def handler(req, exc):
    return JSONResponse(status_code=422, content={'errors': exc.errors()})
   ```

## Dead Ends

- **** — Clients keep sending bad data and pagination logic receives None. (85% fail)
- **** — Moves the failure to an uncaught ValueError deeper in the stack. (70% fail)
