Code Room
Code reviewMediumcr-p009
Subject Api contractLevel Mid–Senior~18 minCommon in Networking & APIs interviewsIndustries Software development

Question

Review this API change. The endpoint used to return 404 for a missing user; the PR changes it to:

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.

Talk through your review
Code to reviewpython
def get_user(id):    u = User.get(id)    if not u:        return {'error': 'not found'}, 200    return u, 200
Run or narrate your approach, then ask the coach.