# fastapi.exceptions.RequestValidationError: 1 validation error for Request
query -> page
  value is not a valid integer (type=type_error.integer)

- **ID:** `python/fastapi-query-parameter-type-error`
- **Domain:** python
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

客户端提供的查询参数 'page' 无法转换为整数类型

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.9 | active | — | — |
| 3.10 | active | — | — |

## Workarounds

1. **提供有效的整数值** (95% success)
   ```
   GET /items?page=1
   ```
2. **使用 Query 设置默认值** (90% success)
   ```
   from fastapi import Query
@app.get('/items')
def get_items(page: int = Query(1, ge=1)):
    ...
   ```

## Dead Ends

- **将参数类型改为 str 并手动转换** — 失去了自动验证功能，可能引入其他错误 (60% fail)
- **在客户端忽略类型检查** — 服务器端仍然会验证并返回错误 (80% fail)
