Should every 5xx response be retried?
Not automatically. Consider whether the operation is safe to repeat, whether the provider marks the error transient and whether an ambiguous side effect must be reconciled first.
D2 Automation Knowledge
The controls D2 checks before treating an API workflow as production-ready: auth, pagination, limits, validation, timeout, retries, schema drift and auditability.
Direct answer
A production API integration is more than a successful 200 response. It needs credential lifecycle management, explicit request/response validation, pagination, rate-limit handling, timeouts, retry classification, idempotency where side effects exist, schema-drift detection, durable error context and observability. The integration contract must also state what happens when either system is unavailable.
Engineering model
Reliable API integration = contract + auth + validation + rate control + retry/idempotency + observability + recovery
01 / Design rule
OAuth tokens expire, API keys rotate and scopes change. Store credentials outside workflow content, define refresh/rotation behavior and alert on authentication failures instead of repeatedly retrying them.
02 / Design rule
Fetching only the first page can look successful while silently losing records. Define page/cursor termination rules, respect provider limits and checkpoint long-running pulls so retry does not duplicate completed work.
03 / Design rule
Validate outbound payloads before sending and validate critical inbound fields before using them. Schema drift should become a visible exception, not a null value that travels through five later nodes before failing.
04 / Design rule
A timeout does not prove the remote system did nothing. For side-effecting calls, query by idempotency/business key or reconcile remote state before repeating the operation.
Implementation checklist
FAQ
Not automatically. Consider whether the operation is safe to repeat, whether the provider marks the error transient and whether an ambiguous side effect must be reconciled first.
In the platform's credential/secret storage or a dedicated secret manager, never embedded in exported workflow JSON, source files or public case-study evidence.
Evidence standard
D2 publishes these boundaries explicitly. The methodology page explains what evidence is required before a system is described as implemented, validated or production-backed.
Read D2 evidence methodologyRelated system evidence
Apply the framework