A workflow calls a supplier API that sometimes times out. When it fails, the team wants a retry and, if it still fails, a Teams alert. What do you implement?
- Exam domain
- Plan and configure agent solutions50–55% of the exam
- Difficulty
- Hard
- In this mock
- 26 questions on this domainPractise this domain
Why the exam asks this
Create and configure workflows
Objective in the exam guide: Implement error handling in workflows
Integrations fail, and the plan for that is part of the build.
Why D is the answer
Retries, then an alert that runs on failure
Error handling in a workflow uses retries for transient failures and steps that run only when an earlier action fails, such as an alert. That keeps the failure visible and handled.
Remember: Retry transient failures, alert on the rest.
How it works
Error handling is the set of steps that run when something goes wrong: retries for transient errors, and alerts or compensating steps when an action finally fails.
Clues in the question
The words that point to the answer, and what each one tells you.
- sometimes times out
- Transient, so retry.
- if it still fails
- A step that runs only on failure.
In detail
- Retries handle transient faults.
- Run-after-failure steps handle what retries cannot fix.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. An instruction in the agent asking it to try againWrongMost tempting
Agent instructions do not control workflow steps.
Why it tempts: Agents can retry in conversation, but this is a workflow step, not a chat.
B. Nothing, because failed runs restart automatically foreverWrong
Failed runs do not retry forever on their own.
C. A second identical workflow that runs an hour laterWrong
A duplicate workflow doubles the problem.
D. Retries, then an alert that runs on failureRight
Retry transient failures, alert on the rest.
Use case
An illustrative scenario, not a real incident.
Illustrative: the supplier API times out at 2 AM. Two retries fail, and the on-call channel gets an alert with the run link.
See it in different ways
stateDiagram-v2 state "Call API" as s0 state "Succeeded" as s1 state "Retrying" as s2 state "Send Teams alert" as s3 [*] --> s0 s0 --> s1: ok s0 --> s2: timeout s2 --> s1: ok s2 --> s3: still failing s1 --> [*] s3 --> [*]
How to read this chart
- It starts at "Call API".
- From "Call API", "ok" moves it to "Succeeded".
- From "Call API", "timeout" moves it to "Retrying".
- From "Retrying", "ok" moves it to "Succeeded".
- From "Retrying", "still failing" moves it to "Send Teams alert".
- It ends at "Succeeded" or "Send Teams alert".
flowchart TD
Q{"Is the failure transient?"}
Q -->|"Yes"| A0["Retry"]
Q -->|"No or retries exhausted"| A1["Alert and stop cleanly"]How to read this chart
- At "Is the failure transient?": if "Yes", go to "Retry"; if "No or retries exhausted", go to "Alert and stop cleanly".