Skip to content

Status Code Picker

Run the Status Code Picker MicroSim Fullscreen

About This MicroSim

Every response from a server starts with a three-digit status code. The first digit tells you the family. A 2xx means it worked, a 4xx means the request was wrong, and a 5xx means the server failed while trying. When a member says "it didn't work," the code tells you which side to look at first.

This MicroSim gives you eight things that happen in the dating-safety app. For each one you pick the code the server should send back, from a board of nine. One of the nine, 503, is there as a distractor and fits no card.

Card 4 follows the running example's own rule: a member who asks for another member's scan gets a 404, not a 403. The other cards are marked "illustrative scenario." The shared family account on card 5 and the cap of ten scans on card 7 are made up for the example.

How to Use

  1. Read the situation card. It describes something that happens, not a definition.
  2. Click one code on the board. Your first pick counts.
  3. Read the feedback. The correct code turns green and its family name lights up in gold.
  4. Press Next card and repeat through card 8.
  5. Press See summary to see all eight cards grouped by family, with your pick and the correct code.
  6. Click a family name at any time to read what that family means. Hover over a code to see its meaning in the panel.

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/status-code-picker/main.html"
        height="604px"
        width="100%"
        scrolling="no"></iframe>

Lesson Plan

Learning Objective

The learner will apply the meanings of nine HTTP status codes to choose the correct response for eight situations in the dating-safety app, with at least 7 of 8 correct.

Bloom level: Apply

Grade Level

Adult professional (Good Enough Engineering)

Duration

10-15 minutes

Prerequisites

HTTP request, HTTP status codes, the 4xx and 5xx families, the 404-or-403 worked case and the daily scan cap. All are from the section "Status Codes: How Did It Go?" in Chapter 2: How a Web App Works.

Activities

  1. Family first (3 min): Before picking a code for each card, decide the family. Is the problem in the request or in the server?
  2. Pick (5 min): Work through the eight cards. Your first pick counts.
  3. Review (5 min): In the summary, look at any card you missed. Say which family you chose and which family was right.

Assessment

  • Mastery is 7 of 8 cards correct on the first pick.
  • Ask the learner: "Why does the app send 404 and not 403 when Dana asks for scan 4822?"
  • Ask the learner: "A vendor takes too long and the server crashes. Why is sending 200 with an empty result dangerous here?"

Common Misconceptions

  • Any error is a 500.
  • A member reaching another member's data should always get a 403.
  • A vendor failing means the server should send 200 with an empty result.
  • 401 and 403 mean the same thing.

References

  1. HTTP response status codes - MDN Web Docs - The full list of codes and their families.
  2. RFC 9110: HTTP Semantics, Section 15 - IETF - The standard that defines status codes.
  3. RFC 6585: Additional HTTP Status Codes - IETF - Defines 429 Too Many Requests.
  4. Chapter 2: How a Web App Works - Good Enough Engineering - The section "A Worked Case: 404 or 403?"