ai-coding-minesIndexGitHub

A 404 on a URL you guessed is not "the capability doesn't exist"

Python and databases

The incident

Looking for the path to correct a record, two names were guessed and tried.

POST .../invoices/correction   -> 404
POST .../invoices/update       -> 404

From that, the conclusion was "this platform has no correction API; it is irreversible." That conclusion drove a plan for manual recovery, went into the documentation as "irreversible", and was reported to someone else as fact.

It was wrong. One search produced the real path.

POST .../orders/updateInvoices

★ The write is .../invoices; the correction is .../updateInvoices.

The assumption was that a verb would hang off the same noun. In reality it was a separate verb path. The whole judgement rested on believing the other side follows resource-tree REST conventions.

★★ Rules

  1. If you guessed the path, a 404 is not evidence. Before concluding, ask "did I invent this URL?"
  2. "The capability doesn't exist" may be said only after docs, search and asking
  3. "Irreversible" is an unusually expensive verdict. That one word produces manual work, design changes, and apologies. Search once more before saying it

★★★ Aside — this rule was already written down

Two days earlier, after a 404 on a different endpoint, this had been recorded:

Do not read a 404 as "no such capability". You have not found the path yet.

Two days later it was broken. Three similar things happened that same week — a validator passed the defect it existed to catch, a format rule was agreed and then violated by hand, and here a judgement rule was written down and not retrieved at the moment of judging.

★★ Writing a rule down and retrieving it at the moment of judgement are two different capabilities.

Recording it is not enough; it has to sit somewhere that fires automatically just before the judgement — a checklist, a lint, a review question — to actually work.