AntiPattern

Async Context Loss & Blocking

async-context-loss-and-blocking

Async handlers and middleware can break request-scoped state when coroutine boundaries or context propagation differ (e.g., BaseHTTPMiddleware vs custom middleware), and synchronous I/O inside async code blocks the event loop, causing test flakiness and stale connections.