Chapter Seven · Errors as Curriculum

When Things Go Wrong

Everything so far assumed the answer came back correct. This chapter is what happens when it does not, and the discovery that an error is just a response wearing different digits. One working setup gets broken five ways on purpose, each break with its own number and its own thirty-second fix. Then the other side fails for a change, honestly and on a schedule, and you learn to wait well instead of hammering. A timeout on a request that creates something raises the hardest question a caller ever faces, and gets an answer. And the chapter closes with the card: five moves that turn panic into procedure.

Nothing in this chapter is new machinery. Errors travel in exactly the responses Chapter 2 took apart, they use the status families you already read at a glance, and they explain themselves in the JSON you learned to read in Chapter 4. What changes here is your relationship to them: an error stops being a wall and becomes a message with a reply address.

The chapter has one spine, and it is a single request. Vera asks Tandem for the station at Old Market, with her key, and it works. Then that setup is broken on purpose — a body the server cannot read at all, the key left out, the key without the right permission, one letter wrong in the path, a word where a number belongs. (The Friday evening when she simply asks too often is real too, and it gets the next chapter.) Add Tandem's honest Sunday maintenance window and you have met every kind of trouble this book will throw at you.

The chapter's arc: one setup, six ways it can go
One working setupthe control specimen
Broken five ways400 · 401 · 403 · 404 · 422
Plus one honest 503nothing to fix, a time to return
The checklistthat sorts them all

Topics in This Chapter