Connect it. Test it. Ship it. / CORE PATH
APIs, JSON & failure policies
Treat external data as an input that can be late, incomplete or unavailable.
Use your networking and n8n experience to reason about timeouts and rate limits.
Understand the idea
Document timeout, schema, pagination, rate-limit and freshness behavior as separate parts of the API contract. HTTP 200 alone does not prove the payload is complete or current.
Retry only the failures and operations that justify it. Preserve the provider timestamp and fetch timestamp, and keep an offline fixture suite so provider outages do not break basic validation tests.
What to learn
- Set an explicit timeout and validate response status and schema.
- Use bounded retries only when appropriate; respect Retry-After.
- Persist provider timestamp, fetch timestamp and provenance.
Practice on your own data
Design an offline EUR/EGP quote fixture with provider_as_of and fetched_at; label it fixture data.
Practice this lesson in the Python lab →
A stale or malformed quote is visible; a cached value is never labeled live.
Prerequisites
Exceptions & honest failures · Files, CSV, JSON & paths · Tests that catch a broken contract
Sources and further reading
- Python language tutorial ↗Official documentation
Track progress on this topic → · Markdown source ↗