Skip to content

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

  1. Click any end point marked "?" in the flow.
  2. Read what happened in the panel on the right.
  3. Pick Passed, Failed or Not checked.
  4. Read the feedback, the correct result, and what the old code showed.
  5. Hover over the question boxes in the flow to read about each step.
  6. 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

  1. Predict (5 min): Before clicking, say which end points mean the vendor searched.
  2. Classify (5 min): Classify all seven end points in any order, one attempt each.
  3. 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

  1. Chapter 9: Working With Outside Services - the sections on silent failure and failure read as empty.
  2. 429 Too Many Requests - MDN Web Docs.
  3. 401 Unauthorized - MDN Web Docs.
  4. Mermaid flowchart syntax - Mermaid documentation.