
The art of the error message - kawera
https://thestyleofelements.org/the-art-of-the-error-message-9f878d0bff80
======
arianvanp
Interesting to hear this from the UX team at spotify. I think these are all
very good advice.

Of course, Decided to see how fast I could trigger an obscure error message in
the app. 2 minutes in:

1\. Enable offline mode 2\. Click a song that hasn't been downloaded yet 3\.
"Song unavailable" is the error. No explanation why.

~~~
r3bl
Looking at that one-pager linked at the bottom[0], it seems there's only 12
error messages in Spotify where this gets applied.

While I have certainly seen at least five of those, I'm not surprised that
you've managed to trigger the one without it in two minutes. After all, an app
like Spotify probably has significantly more than 12 error messages in it.

[0]
[https://drive.google.com/file/d/0B6f9wHapAofKRFdvU3BUbVZjckU...](https://drive.google.com/file/d/0B6f9wHapAofKRFdvU3BUbVZjckU/view)

------
vadimberman
Great advice, BUT: apart from the laziness and the poor written communication
skills, often the real reason for the vagueness is that these pesky details
are simply unavailable to the coders who throw that exception or issue that
message. It is buried somewhere deep in the bowels of inner components.

Better error messages start with better architecture.

~~~
adrianratnapala
Yes. From the title, I thought the article was about how to actually address
that problem.

That said, I wonder if you could invert it. When trying to make a seemingly
arbitrary architectural choice, then perhps to break the tie you can ask
yourself "if an error occurs, will this allow me to get the right info to the
user?"

~~~
vadimberman
> When trying to make a seemingly arbitrary architectural choice, then perhps
> to break the tie you can ask yourself "if an error occurs, will this allow
> me to get the right info to the user?"

Definitely. That is something I've never heard discussed, and it really should
be discussed. User experience is influenced by the inner works of the engine,
too.

------
WalterBright
One thing that has amazingly never improved for 20 years. That's when your
internet connection does not work. It could be anything from:

1\. your computer broke 2\. your network/wifi card failed 3\. your wifi access
point failed 4\. your hub/switch failed 5\. your router failed 6\. your cable
modem failed 7\. your ISP failed 8\. the URL you were trying to reach failed

The error message you get is just a generic one with no clue at all.

~~~
kalleboo
My pet peeve is HTTPS/SSL errors when your clock is off (usually caused by a
dead battery and your device time resetting to 1970). Breaks pretty much all
network services on your machine, and absolutely no software tells you it's
because your time is completely unreasonable.

~~~
spondyl
Google Chrome actually will tell you about your clock settings I believe?

------
dkarl
It's nice to see this raised as an important issue for designers. It can be
really hard to get anybody outside engineering interested in error messages
until they see them show up in production.

I also like the emphasis on giving explanations that help the user understand
what they can and can't do next. When users see errors, they immediately go
into the mode of trying to make it work. They get hyped up and focused; they
don't relax. A vague "friendly" message will just frustrate them further if it
doesn't help them understand what to do next.

I think this is one aspect of UX where engineers can provide a unique
perspective. I think designers and product managers are often surprised by the
amount of energy a user can pour into struggling with an error, and the level
of anger and frustration that can result. As programmers we can identify with
that experience better than most, so we need to take it on ourselves to write
good error messages and, when possible, present them to the designer as part
of the design that needs their attention and vetting.

~~~
Alex3917
> It can be really hard to get anybody outside engineering interested in error
> messages until they see them show up in production.

IMHO any given request should be able to return multiple errors for the
different stakeholders who will be consuming them. A good JSON error response
could be something like:

{ 'display_error': '', 'field_errors': { 'field1': []}, 'internal_error': '' }

The idea is that display error is something shown to the user, possibly a
form-level error when relevant. Field errors are validation errors for user-
submitted data. And internal errors are things that aren't shown to users, and
are only meant as a way for backend and frontend devs to communicate amongst
themselves to help debugging.

~~~
mdaniel
[https://tools.ietf.org/html/rfc7807](https://tools.ietf.org/html/rfc7807)
("Problem Details for HTTP APIs") may interest you (but just for clarity: I
only know _about_ it, but haven't attempted to apply it to any situation)

------
kuschku
I'll quote the Android Guidelines on error messages here, because they
summarize it well into a single sentence:

> It's not my fault

> Be gentle in how you prompt people to make corrections. They want to feel
> smart when they use your app. If something goes wrong, give clear recovery
> instructions but spare them the technical details. If you can fix it behind
> the scenes, even better.

You can find the other design principles of Android quickly summarized here:
[https://developer.android.com/design/get-
started/principles....](https://developer.android.com/design/get-
started/principles.html)

These design principles are important for any developer, on any platform, and
they're short enough that they're easy to remember.

------
Animats
See the Macintosh User Interface Guidelines for the original Mac. They thought
this through.

Error messages were to be two sentences. The first one explains the problem.
The second sentence says what to do about it. There were rules for buttons,
too. "Your file has been lost" should have a button that says "Sorry", not
"OK".

~~~
kevinwang
Why "Sorry" as a button? It sounds pretty awkward to me. I wouldn't be sure
what clicking it would do. And, the button text is usually the option that I
choose, but why would I say "sorry"?

~~~
CharlesW
> _Why "Sorry" as a button?_

I believe the idea was that making the user click "OK" was adding insult to
injury, and "Cancel" wouldn't have made sense either.

That said, the word "sorry" doesn't appear in a HIG from 1992 (the earliest I
could find in PDF form).

------
rileymat2
Last week I saw someone get stuck trying to change his password, the interface
would not tell him what criteria was making it not secure enough.

~~~
nkrisc
The problem was probably that it wasn't exactly six characters long and only
alphanumeric.

~~~
rdiddly
Yeah, too secure.

------
tinyrick2
Also equally important and related to the article is messages on exceptions
raised by libraries used by developers. I think this is one of the primary
reasons why I found some Python's open sourced libraries like Numpy or Pandas
easy to learn. Most of the messages when an exception is raised are specific
and helpful in helping me fixing the error.

------
PaulRobinson
Mate of mine from years ago (we've lost touch), once told me that the system
he built to scan blood samples and used by lab techs all over the UK had some
very interesting error messages he put in there.

He got a call one day from a customer who told him the error message read
"Fuckity, fuckity, fuck, everything's about to get stuck". His response on the
phone was "Well, the good news is I know exactly where the error is..."

It was in a loop you shouldn't be able to get into and so his defence was that
this error was "impossible".

------
CM30
Yeah, can't really disagree with any of this. Depressing how many programmers
and software designers don't listen to this advice though, I mean, look at the
standard Windows Media Player error nowadays. Server execution failed, really?
You couldn't be more precise than that?

Eh, I guess it's still better than the (thankfully very rare outside of
deliberate glitches) error Nintendo consoles give you now. "The software
closed because an error occurred". Thanks for that useful piece of advice.

~~~
r3bl
Nothing's worse than Windows 10's "something happened" error message:
[https://i.stack.imgur.com/LRZtX.png](https://i.stack.imgur.com/LRZtX.png)

~~~
b4lancesh33t
Diagnosing failed windows updated is tough for exactly this reason. The UI
doesn't bubble up anything detailed, not even an opaque error number. You have
to dig through the log files.

~~~
barrkel
If you even get log files, and they aren't locked away in trace files that
need conversion.

------
pcvpcvpcv
Haha. Last error message I saw from Spotify was: "Login failed. Unable to
login, either username or password is incorrect. Have you signed up for a
Spotify account?". The issue was that I filled in my email instead of username
into a form that said "Username or email", see
[https://community.spotify.com/t5/iOS-iPhone-iPad/I-can-t-
log...](https://community.spotify.com/t5/iOS-iPhone-iPad/I-can-t-log-onto-my-
spotify-iPhone-app/td-p/894951) Tell me something about error messages,
Spotify.

------
rrauenza
There was an excellent talk by Larry Wall on the perl6 error message design. I
think it was in Santa Clara and it was a Perl Conference, but haven't found a
transcript yet. It was about 9 years ago.

Anyone have a link?

~~~
raiph
There's a youtube of a 2008 Google talk at
[https://www.youtube.com/watch?v=JzIWdJVP-
wo&list=PLRuESFRW2F...](https://www.youtube.com/watch?v=JzIWdJVP-
wo&list=PLRuESFRW2Fa77XObvk7-BYVFwobZHdXdK&index=162)

He talks a bit about error messages. I found that by searching for `message`
in the transcript generated by selecting the 'Open transcript" menu option of
the ... button.

Hth.

------
rents
So is there a guide for error messages when the message is not client facing.
The grammar, format, etc. +1 if it also provides language specific info , for
example in Java use e.getMessage() etc?

------
SaladFork
One of Nielsen's classic UX heuristics:

> Error messages should be expressed in plain language (no codes), precisely
> indicate the problem, and constructively suggest a solution.

------
beefhash
ed has perfected it years ago:

?

------
katastic
I love diagnosing Microsoft enterprise frameworks.

Half the time in CRM or NAV, it's either an error code with zero google
results, or, "general error."

And yes, I know about tracing.

------
aisofteng
It's disappointing that this needs to be spelled out. It really should be
common sense, minimal competency.

