# AssertionError: Route order matters, overlapping routes detected

- **ID:** `python/starlette-route-order-shadowing`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Defining a catch-all or parameterized route before a specific route causes shadowing.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   Define specific routes first: routes = [
    Route('/users/me', me),
    Route('/users/{user_id}', user),
]
   ```
2. **** (90% success)
   ```
   Use path converters with constraints: Route('/files/{path:path}', file_handler)
   ```

## Dead Ends

- **** — Loses functionality; should reorder instead. (50% fail)
- **** — Regex may still match broader patterns. (60% fail)
