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

Question

Review this endpoint that returns either a list or an error.

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 list_items():    items = get_items()    if not items:        return {'error': 'none found'}    return items
Run or narrate your approach, then ask the coach.