# A pipeline calls an external pricing API

Canonical URL: <https://datadriven.io/problems/a-pipeline-calls-an-external-pricing-api-the-current-code-i-32e47331>

Domain: Pipeline Design · Difficulty: medium

## Problem

A pipeline calls an external pricing API. The current code is a while-True loop with bare except: it catches every exception, never sleeps, never gives up, and retries permanent errors forever. The section's smallest correct retry has three numbers (max_attempts, wait between attempts, the transient exception types it catches) and one rule (only transient errors retry; permanent errors propagate). Replace the broken enrich transform with one whose name states the retry policy. The retry assumes the underlying write is idempotent.

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/a-pipeline-calls-an-external-pricing-api-the-current-code-i-32e47331)
- [System Design Interview Questions](https://datadriven.io/data-engineering-system-design)
- [Data Engineering Interview Prep Guide](https://datadriven.io/data-engineer-interview-prep)
- [Daily Challenge](https://datadriven.io/daily)

---

Source: DataDriven (https://datadriven.io). 100% free data engineering interview prep. Live code execution against Postgres 16, Python 3.11, and Spark sandboxes. No paywall, no premium tier, no signup gate.