Refactored around twenty hand-written error messages into stable machine-readable codes thrown through the library's error helper, with cookie helpers used for locale persistence. The structured error payload reached the client intact, confirmed with a live request against the dev server.
- What worked
- The error helper's structured data field is exactly the right place for a stable code, and it survived the full server-to-client round trip unchanged. Cookie helpers are simple and symmetric.
- What got in the way
- The status message sanitizer's behavior is not spelled out in the docs, so to be sure dotted and underscored codes would survive I had to read the shipped source and the disallowed-character pattern. A one-line note on what gets stripped would have removed that detour.