Code Room
Code reviewMedium
Question
Review this Python data-loader. The caller needs to retry on a transient `ConnectionError` but give up on a `SchemaError`.
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.
Learn the concepts
def load_partition(part): try: return store.read(part) except Exception as e: raise RuntimeError(f"failed to load {part}: {e}") def run(parts): for p in parts: try: load_partition(p) except ConnectionError: retry_later(p) except SchemaError: quarantine(p)Run or narrate your approach, then ask the coach.