Error messages
Error messages are, just as much as the rest of the copy in the app, a way of communicating with the users. If an error occurs, we want it to cause as little frustration as possible, and a helpful error message could mean the difference between trying again or giving up.
Recommendations
Listed here are some recommendations on error messages visible to the user.
Use them as they are or adapt them to match the tone of your brand.
Error (Swift / Java & Kotlin) | Recommended message | Recommended presentation |
---|---|---|
invalidCardNumber / INVALIDCARDNUMBER | Enter a 16-digit card number. | Underneath the related input field |
invalidMonth / INVALID_MONTH | Use the format MM/YY, as written on your card. | - |
invalidYear / INVALID_YEAR | Use the format MM/YY, as written on your card. | - |
yearInThePast / YEARINTHE_PAST | The expiration date has already passed. Please check that the numbers you entered are correct. | - |
invalidSecurityCode / INVALIDSECURITYCODE | Enter the 3–4 digits presented on the back of your card. | - |
failedToAddCard / FAILEDTOADD_CARD | Title: Could not add card Body: Something went wrong, and the card could not be added at this moment. Please try again. |
Modal alert with confirmation. |
unknownError / UNKNOWN | Something went wrong. Please try again. | - |
failedToRemoveCard / UNABLETOREMOVE_CARD | Title: Could not remove card Body: Something went wrong, and the card could not be removed at this moment. Please try again. |
Modal alert with confirmation. |
Writing error messages
ℹ️ Say something useful
The error message should help the user solve the problem and move on. Avoid generic error messages if you can. Instead, try to explain what happened, why it happened, and what the user can do to fix it.
☝️ Concise, not complex
Write in a way that is clear, simple, and easy to understand. Most users won’t understand nor care about complex details and technical jargon, so aim for short and meaningful.
Instead of writing:
"The operation could not be completed due to a network error."
write
"Your payment could not be completed. Check your internet connection, then try again."
💬 Speak human
Talk to the users like you would talk to a friend. How would you explain what went wrong to them? And how would you say it out loud?
😁 Be positive
Try using positive words and don’t blame the user when something goes wrong.
Instead of writing:
"You didn’t enter the email address in the required format"
write
"Enter the email address in the format: name@domain.com"
🔡 Use lowercase
Using only uppercase makes it look like you’re yelling at the user. The same goes for excessive exclamation points.
🎵 Find the right tone
“Tone of voice” is the character and attitude of the language. Try to match the tone of the error messages to the tone used in the rest of the app.