Where a Vendor Failure Can Hide¶
Run the Where a Vendor Failure Can Hide MicroSim Fullscreen
About This MicroSim¶
This MicroSim traces one call from an adapter to an image-search vendor. The call can end in seven places. Some end points mean the vendor searched and answered. Others mean no search happened at all: a timeout, a rate limit, a server error, a changed response shape, or a rejected API key.
Each end point starts hidden behind a "?". You decide what the member should see for it. Then the sim shows the correct result next to what old catch-all code showed: code that wraps a vendor call in catch { return []; }.
The seven end points are illustrative. The 10-second timeout and the 3 attempts come from the chapter's sections on timeouts and retries.
How to Use¶
- Click any end point marked "?" in the flow.
- Read what happened in the panel on the right.
- Pick Passed, Failed or Not checked.
- Read the feedback, the correct result, and what the old code showed.
- Hover over the question boxes in the flow to read about each step.
- After all seven, read the summary. Press Start over to try again.
Iframe Embed Code¶
You can add this MicroSim to any web page by adding this to your HTML:
<iframe src="https://arunbatchu.github.io/good-enough-engineering/sims/vendor-failure-paths/main.html"
height="622px"
width="100%"
scrolling="no"></iframe>
Lesson Plan¶
Learning Objective¶
Classify each of seven ways an image-search call can end as passed, failed or not checked, and identify which of them a catch-all empty result turns into a false pass.
Grade Level¶
Adult professional (Good Enough Engineering)
Duration¶
10-15 minutes
Prerequisites¶
Third-party service, API adapter, timeout, rate limit, retry, vendor response validation, failure read as empty, and the three results passed, failed and not checked.
Activities¶
- Predict (5 min): Before clicking, say which end points mean the vendor searched.
- Classify (5 min): Classify all seven end points in any order, one attempt each.
- Discuss (5 min): Count how many end points the old catch-all code showed as Passed. Which of these could your own app's adapters produce?
Assessment¶
Mastery is 7 of 7 end points classified correctly on the first attempt. Reading the feedback after picking is exploration, not evidence.
References¶
- Chapter 9: Working With Outside Services - the sections on silent failure and failure read as empty.
- 429 Too Many Requests - MDN Web Docs.
- 401 Unauthorized - MDN Web Docs.
- Mermaid flowchart syntax - Mermaid documentation.