Code RoomRequest hangs indefinitely
MediumPrep Room Coding #2215

Request hangs indefinitely

Code reviewNetworking & APIsMid–Senior~15 min

Review this Python function that fetches a downstream service.

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.

0:00 of about 15 min
Mark a line and say what kind of problem it is.0 findings
1import requests
2 
3def get_user(user_id):
4 url = f"https://users.internal/api/v1/users/{user_id}"
5 resp = requests.get(url)
6 resp.raise_for_status()
7 return resp.json()
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.