Errors and recovery
Preventing mistakes and helping users recover from them.
Good error handling prevents mistakes where possible, explains them in plain language and offers a way out, such as undo. Error messages are often written by engineers at the last minute. Treating them as part of the design pays off.
Why it matters for a product engineer
Errors are where a product shows whether it respects people’s time. Engineers often write error messages at the last minute, and they decide what the system does after a failure. A good error is prevented, or it explains what happened in plain words and offers a way out.
How to do it
- Prevent the likely mistakes first: constrain inputs, use good defaults, and offer undo for destructive actions.
- Ask “Are you sure?” only for actions that are hard to undo. NN/g warns that frequent confirmations teach people to click through without reading. Label the buttons with the action, such as “Delete file” and “Keep file”.
- Show the message next to the problem, after the user has acted, not while they are still typing.
- Say what happened and how to fix it, in plain words. Put the blame on the system, not the user.
- Keep what the user entered, and make the fix one step.
- Score your messages with NN/g’s rubric: twelve guidelines in three groups, visibility, communication and efficiency.
Common mistakes
- Error codes and technical words in the message.
- Messages that blame the user, or sound like a reprimand.
- Errors shown at the top of the page, far from the field that caused them.
- Silent failures: nothing happens, and nothing says why.
Example
An agent’s audit of RelievApp found silent misses. In the pain scene the agent pressed above the point for seven seconds; nothing moved and nothing said why. In a session for someone in pain, a silent miss feels like the person failed. (RelievApp in In practice)
A silent miss in RelievApp's pain scene, against three of NN/g's guidelines
| What happened | What the guideline asks | |
|---|---|---|
| Close to the source | Nothing appeared | A message next to the element |
| Describe the issue | No explanation | What went wrong, in plain words |
| Constructive advice | None | A fix that takes little effort |
A miss with no answer fails all three at once. The audit's rule for every scene: every input gets an answer.
ObservedAn agent's audit of RelievApp, 16 Nov 2026; NN/g's error message rubric
Sources: An error messages scoring rubric (NN/g) ↗ · Hostile patterns in error messages (NN/g) ↗ · Confirmation dialogs can prevent user errors (NN/g) ↗
Technical leverage
Implement retries, undo and stable intermediate state; distinguish recoverable failures from actions that require review.
Evidence of mastery
Put it into practice- Practice
- Design and implement recovery for a failed user task, including an incorrect AI suggestion where relevant.
- Artifact
- A working failure scenario and a tested route back to a useful state.
What good looks like
- Recovery preserves the user’s work.
- Repeated actions do not duplicate side effects.
Use this evidence to assess your work. Your map status is a self-assessment, not a certification.
Resources
3- articleStart here
An error messages scoring rubric ↗
NN/g · 2023 · 14 minA checklist to score your own error messages on visibility, clarity and help to recover.
- articleStart here
Hostile patterns in error messages ↗
NN/g · 2022 · 9 minThe common ways error messages blame or confuse users, and what to write instead.
- articleGo deeper
Confirmation dialogs can prevent user errors ↗
NN/g · 2018 · 9 minWhen to ask "are you sure?", and how overusing it trains people to click through without reading.