Skip to main content
Error messages are critical moments in the user experience. A good error message explains what went wrong and provides a clear path to recovery.

The pattern

[What failed]. [Why/context]. [What to do].
Every error message should answer three questions:
  1. What happened?
  2. Why did it happen?
  3. What can I do about it?

Error message types

Validation errors (inline)

Show as user completes a field or on blur. Provide brief, specific guidance to correct input.Pattern: [Field] [specific requirement]Examples:
  • “Email must include @”
  • “Password must be at least 8 characters”
  • “Choose a date in the future”
When to show: Real-time or on field exitWhere to show: Below or beside the field
Keep validation errors extremely concise. Users are still filling out the form and need quick guidance.

What to avoid

These common patterns create frustration and confusion:
  • Technical codes without explanation: “Error 403” tells users nothing
  • Blame language: “Invalid input” or “illegal character” sounds accusatory
  • Robotic tone: “An error has occurred” feels cold and unhelpful
  • Dead ends: Error with no recovery path leaves users stuck
  • Vague causes: “Something went wrong” doesn’t help users fix the problem

Before and after examples

Example 1: Payment failure

“An error has occurred while processing your payment. Please try again later or contact customer support if the problem persists.”Problems:
  • Passive voice (“has occurred”)
  • Vague timeframe (“later”)
  • Doesn’t suggest likely cause
  • Forces user to escalate immediately
“We couldn’t process your payment. Check your card details and try again.”Why it works:
  • Active voice (“we couldn’t”)
  • Suggests likely cause (card details)
  • Immediate action user can take
  • Only 11 words

Example 2: Form validation

“Invalid email address. Please enter a valid email.”Problems:
  • Uses word “invalid” (blame language)
  • Doesn’t specify what’s wrong
  • Redundant (says “email” twice)
“Email must include @”Why it works:
  • Specific requirement
  • No blame language
  • Only 4 words
  • Tells user exactly what to fix

Example 3: File upload

“Error: Upload failed.”Problems:
  • No explanation of why
  • No recovery action
  • Dead end for user
“Upload failed. File is too large. Choose a file under 10MB.”Why it works:
  • Explains what failed
  • States the cause
  • Provides specific limit
  • Clear recovery action

Writing empathetic errors

1

Never blame the user

Even when the error is user-caused, avoid accusatory language.
  • Good: “Password must be at least 8 characters”
  • Avoid: “You entered an invalid password”
2

Be specific about the problem

Vague errors create anxiety. Tell users exactly what went wrong.
  • Good: “Your session expired after 30 minutes of inactivity”
  • Avoid: “Session timeout”
3

Provide actionable next steps

Every error should have a clear recovery path.
  • Good: “Connection lost. Check your internet and try again.”
  • Avoid: “Network error”
4

Match the tone to severity

High-stakes errors need serious tone. Low-stakes can be lighter.
  • High stakes: “Payment failed. Your card was declined.”
  • Low stakes: “Couldn’t load image. Refresh to try again.”

Accessibility considerations

Use Error: prefix for screen readers to identify error messages
Associate error text with form fields programmatically
Don’t rely on color alone - include text and icons
Keep critical errors under 14 words for 90% comprehension

Quick checklist

Before shipping an error message, verify:
  • Explains what failed
  • Explains why it failed (when helpful)
  • Provides recovery action
  • Uses empathetic, non-blaming tone
  • Avoids technical jargon
  • Works without color (includes text)
  • Under 18 words (ideal: 12-15)