Code Room
Code reviewHardcr-g105
Subject Retry logicLevel Senior–Staff~30 minCommon in Code quality & review interviewsIndustries Software development

Question

Review this Python layered-retry across a call chain.

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_price(item):    for _ in range(3):        try:            return pricing_client.fetch(item)  # also retries 3x internally        except TransientError:            continue    raise PricingUnavailable() def checkout(cart):    return [get_price(i) for i in cart.items]  # called by an endpoint that retries 3x
Run or narrate your approach, then ask the coach.