beginner · Interactive lab
Retry Decisions
The same HTTP status can require different actions. Learn to decide from the failure context — not from a cheat sheet.
By the end: Read a failure together with its context: who is waiting, how long the problem lasts, and whether anything can be corrected automatically.
Your challenge
Start here. This lab opens with a status-code cheat sheet: every 503 is retried, every 401 refreshes the token, every 429 waits, and every 400 is parked. Some of those are wrong for their situation. Read each failure, choose, and test.
See it happen
Watch five failures, then decide

- Order Processing → Integration Logic
- Integration Logic → Warehouse API: delivery attempt
- Integration Logic → DLQ: parked for a person
One question, many answers
Order Processing sends an order. Integration Logic calls the Warehouse API. When the Warehouse API answers with an error, the status code says what went wrong — not what to do. For that, Integration Logic reads the context.
Learn more
Why this pattern exists
When the Warehouse API answers with an error, Integration Logic has to choose what happens to the order. Retrying is only one choice. Some failures clear on their own; some need something corrected first; some come with an instruction to wait; some need a person; and sometimes the most useful thing is to say no at once. The status code tells you what kind of problem the API saw. It does not tell you which of these to do.
Order Processing sends orders through Integration Logic to the Warehouse API. Each graded failure is a fixed, authored situation: an HTTP status code plus the context Integration Logic can see. No real API is called.
- Read a failure together with its context: who is waiting, how long the problem lasts, and whether anything can be corrected automatically.
- Choose between retrying the same request, correcting it first, waiting for Retry-After, parking it for a person, and failing fast.
- See why the same status code can call for different decisions.
The rule this lesson applies: Retry the same request only when time will fix the problem and the request itself is fine. Correct the request or refresh the credential first when a known rule can fix it. When the API sends Retry-After, respect it, unless someone is waiting who cannot wait that long. Park the order in the DLQ when only a person can fix it and nobody is waiting. Fail fast when someone is waiting and no retry can succeed in time. This lesson grades every failure against its whole context, never the status code alone.

