How to get error messages right
The version of this that works is simpler than the version most people imagine. The short answer to error messages is that it is mostly a sequence of small decisions, not one big one.
The measurable part of design is whether people can find what they came for and act on it without hesitating. Assume whoever inherits this will have half your context and none of your patience.
Why this earns attention
Say what went wrong and what to do about it. The reasoning matters more than the rule, because the rule has exceptions. Most teams find the first pass takes an afternoon and the maintenance takes minutes a month.
The steps
- Establish what you have today before changing anything
- Never blame the person reading the message
- Put the error next to the field that caused it
- Write down the decision so the next person does not re-litigate it
Put the error next to the field that caused it. It is worth being explicit about, because assumptions differ quietly. The practical test is whether someone new to the project could tell, in a minute, that it had been handled.
What to do next
What this looks like day to day
Design decisions are the ones clients feel most confident arguing about, which makes it worth separating taste from evidence early. Three things worth confirming about error messages before you move on:
- Someone can say what the current setup is without going to look
- Say what went wrong and what to do about it — and you know whether that is true here
- There is a way to tell whether the last change to this helped
Worth checking on your own setup before it becomes someone else's problem to fix.