Skip to content
mentoor

Topic 2 of 5 · 4 min read

Error messages that say what to do next

Goal: Rewrite a generic error message so it states what failed, why if known, and the next step the user can take.

A good error message tells the user what failed, why if you know, and what to do next, in plain words and without blame. "Something went wrong" does none of the three.

Check yourself · 1 of 3

Which set lists the three parts of a good error message?

Choose one answer

Why it matters

An error appears at the worst moment: the user has done work and it did not go through. If the message is vague, they cannot fix it, so they retry, give up or contact support. Models make this easy to get wrong. Asked for "an error message", Claude, ChatGPT or Gemini will often return an apologetic, generic line, or repeat the technical text from the log, such as "Error 500: NullReferenceException".

How to do it

Write every error in three parts:

  1. What failed. Name the action: "Your card was not charged", "The file was not uploaded".
  2. Why, if known. "The file is 12 MB and the limit is 10 MB." If you do not know why, say so; do not invent a reason.
  3. What to do next. One step the user can take: "Choose a smaller file", "Check your connection and try again". If nothing can be done, say who can help and how.

Rules that make it better:

  • Never blame. "You entered an invalid date" becomes "Enter a date like 31/12/2026".
  • Show it where the action happened. Put a field error next to the field, and a failed save inside the open dialog. Do not close the dialog and show the error later.
  • Keep the technical detail out of the main text. A short reference code at the end ("Reference 8F2K") lets support find the log without scaring the user.
  • Tone matches the harm. No jokes or exclamation marks when money or data is at risk.

When you ask an AI, give it the real cause. Paste the error code, what the user was doing and the options they have. The model cannot know your rate limit or your refund policy, and it will fill the gap with a plausible guess.

Before and after

Weak: "Oops! Something went wrong. Please try again later."

Better: "Your payment was not taken. Your bank declined the card. Try another card or contact your bank. Reference 8F2K."

What goes wrong

  • The cheerful non-answer. "Oops!" with no cause and no step.
  • The invented reason. The model says "your session timed out" when the real cause was a server fault, and the user wastes time logging in again.
  • Blame in the wording. "You must enter a valid..." makes people feel at fault for a rule they could not see.

Examples

Upload error

Before: Upload failed.

After: The file was not uploaded because it is 12 MB and the limit is 10 MB. Choose a smaller file or compress this one.

Form error without blame

Before: Invalid date entered.

After: Enter the date as day, month and year, for example 31/12/2026.

Key points

  • Every error message needs three things: what failed, why if known, and what to do next.
  • Never invent a cause; if the reason is unknown, say what you do know and offer a next step.
  • Write instructions, not blame: tell the user what to enter, not what they did wrong.
  • Show the error where the action happened and keep the dialog open.
  • Give the model the real error code and the user's options, because it cannot see your system.

Common mistakes

  • Accepting Something went wrong with a friendly emoji or Oops in front of it.
  • Letting the model guess a cause it cannot know.
  • Pasting the raw technical error into the user-facing text.
  • Closing the dialog on failure so the message appears away from the action.

Check yourself · 2 of 3

Which rewrite of "Invalid password" avoids blaming the user?

Choose one answer

Check yourself · 3 of 3

Your payment API returned a card_declined code. An AI draft says "Your session timed out. Please log in again." What is wrong with it?

Choose one answer

Practice items, not counted towards your mastery.

Start here

Where to go in your country