python
runtime_error
ai_generated
true
starlette.exceptions.HTTPException: 404: Not Found
ID: python/starlette-http-exception
80%Fix Rate
88%Confidence
0Evidence
2024-07-15First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 0.30.x | active | — | — | — |
| 0.40.x | active | — | — | — |
Root Cause
A route or resource is not found; raised by Starlette when no matching route exists.
generic中文
未找到路由或资源;当没有匹配的路由时由 Starlette 引发。
Workarounds
-
95% success
Check `app.routes` or the OpenAPI docs at /docs.
-
90% success
app.include_router(router, prefix='/api/v1')
Dead Ends
Common approaches that don't work:
-
70% fail
Masks the 404 but doesn't fix the missing route or typo.
-
90% fail
Debug mode shows traceback but doesn't resolve missing route.