Specify Error Handling for APIs
APIs fail: tell Claude what to do when they do.
Where you'll practice this
2 Promptles scenarios teach this principle directly. Each one drops you into a real engineering ticket and asks you to write the prompt you'd send to Claude Code.
The API Rate Limiter
You have a CSV file `companies.csv` with 2,000 company names. You want a Python script called `enrich.py` that calls the Clearbit Company API (`GET https://company.clearbit.com/v2/companies/find?domain={domain}`) for each company to get enrichment data (industry, employee count,…
The Bulk Updater
You need a Python script called `update_prices.py` that reads a CSV file `price_updates.csv` (columns: `product_id`, `new_price`) and updates each product via your REST API at `PATCH /api/products/{product_id}` with a JSON body `{"price": new_price}`. Before updating, the script…