Code Room
Code reviewMediumcr-g087
Subject Swallowed exceptionsLevel Mid–Senior~20 minCommon in Code quality & review interviewsIndustries Software development

Question

Review this Python payment-capture helper.

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 capture_payment(charge_id):    try:        resp = gateway.capture(charge_id)        db.mark_captured(charge_id, resp.txn_id)        return True    except Exception:        pass    return False def run_batch(charge_ids):    results = {}    for cid in charge_ids:        results[cid] = capture_payment(cid)    return results
Run or narrate your approach, then ask the coach.