Agent Wranglers

Errors Required

Hide internals in errors

Never put stack traces, queries, file paths or server versions in an error. Log them, and return a reference the client can quote.

How to do it

Map unexpected exceptions to a 500 problem with a generic title and the request ID. See short errors.

How to check

Force a server error in staging. The body holds only the problem fields and a reference, and the log holds the trace under that reference.

For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers api design playbook: https://agentwranglers.se/playbook/api-design/errors/no-internal-details.