Code Room
Code reviewHard
Question
Review this async request handler. Tail latency on the whole service got worse after this endpoint shipped, even for unrelated routes.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
import time, requests async def enrich(request): user = request.user_id # call the profile service resp = requests.get(f"https://profiles.internal/u/{user}", timeout=2) time.sleep(0.05) # small backoff before responding return {"profile": resp.json()}Run or narrate your approach, then ask the coach.