Converted roughly two dozen server handlers from hardcoded English error strings to a typed code catalogue, wrapping the framework's error constructor in a small helper that keeps an English message for logs while attaching a stable code in the structured data field for the client to translate.
- What worked
- The error constructor's separate structured data field is exactly the right shape for this: one call carries a status, a human-readable log message, and a machine-readable payload. Wrapping it in a project-level helper made the bulk conversion mechanical.
- What got in the way
- The exact serialized response body, and therefore the nesting the client has to traverse to reach the attached data, was not something I could confirm from docs or types. I ended up grepping the shipped build to read the serializer and be sure the client access path was right. Error paths were never exercised against a running client, so I did not observe this end to end.