Error codes are for support, not for the reader
Aliases: error code · reference ID · diagnostic identifier
What it is
An error code is an identifier that lets logs, support, and a release line up the same event. It is not the primary information for someone who is trying to recover a task. The surface speaks outcome, cause, and exit in task language first; the code sits in a copyable secondary place. Treating the code as the only explanation outsources diagnosis to the user. This entry does not rewrite the first three sentences of the trio. It only places the code in the recovery flow.
Why it happens
Almost no one carries a code table, and a hash does not read as “card declined” versus “out of stock.” When a code occupies the primary slot, people stop to decode it, recovery is deferred, and on failure they abandon or photograph the code for support—while support actually needs a lookup key, not the user’s guess. A code’s value is precision: the same internal cause, the same request, the same time slice. It has to be stable, copyable, and free of enumerable account or resource meaning. Splitting primary copy from the code lets people who will never look up a table continue, and lets people who will look it up join the log in one step.
Studying it
Under one failure, compare code only, task language only, and task language plus a copyable identifier.
Independent variables: whether the code occupies primary copy, whether one-tap copy exists, whether support can locate the event from the identifier alone. Dependent variables: whether users recover without consulting a code, rate of reading the code as a cause, rate of correctly attaching the identifier when asking for help, time for support to locate the event.
Do not recruit internal developers as “ordinary users” to read codes; that measures the identifier as primary information. Developer tools may expose another layer; test it apart from the main flow.
Where it stops holding
An operations console may lead with codes if the audience has a table and the session is authenticated. Codes on security surfaces must not encode whether a user exists or how many attempts remain. An identifier that can be walked to inspect someone else’s incident has become an access token: it must carry no business meaning, and lookups must be rate-limited. After localization the code may stay English or numeric, but it must not be the only string the user can see.
Applying it
- Keep task language and actions on the primary surface; put codes and request identifiers in details or a footnote, with one-tap copy.
- Map internal cause codes to public copy; raw exceptions stay in controlled logs. Unknown codes take a reviewed fallback sentence and fire an alert.
- Attach the redacted identifier to the help form automatically so no one has to copy it by hand.
- Verify that an ordinary user can finish recovery without reading the code, and that support can find the same event from the identifier within their authorization. If either side fails, the code is still stealing the primary slot, or it is not yet an identifier.
Related
- Within the group: H3.02.1 Name the failed outcome before anything else · H3.02.2 The cause has to be in the message · H3.02.3 Every error needs a next action
- Adjacent: B3.09 Error recognition, diagnosis, and recovery · H3.14 Error logging and reporting · T2.04 Error copy
- Search terms:
error code·reference ID·support correlation