ai-coding-minesIndexGitHub

"It was accepted" is not "it was correct" — fallback values that disable features

Python and databases

Situation

When you must send a value that isn't in the accepted list, a catch-all value that "takes anything" is tempting.

The trap

That catch-all may be a value that turns a feature off. Here it meant "no tracking information" — the request passes, but the end user loses tracking entirely. In that state the record also cannot be corrected from the admin UI.

An API accepting a value does not mean the value is semantically right.

★ **When choosing a fallback, look at what that value turns *off*, not what it turns on.**

What was done instead

Carriers missing from the list were identified by tracking-number format and mapped to the closest real code. The option that kept tracking alive was chosen.