Get AI summaries of any video or article — Sign up free
James Scott - How to write the perfect error message thumbnail

James Scott - How to write the perfect error message

Write the Docs·
6 min read

Based on Write the Docs's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

Treat error messages as micro-documentation: they should notify, explain, and—most importantly—provide actionable recovery steps.

Briefing

Error messages are small pieces of microcopy with outsized consequences: when they’re unclear, blameful, or dead ends, they can trigger frustration, increase support costs, and even become public jokes. A widely cited example from 2003 shows how nine unhelpful words—“This page is too large to be shown completely”—left customers unsure what to do. Over two years, users contacted customer support hundreds of times, and internal analysis later pegged the cost at about $50,000 (roughly €45,000 at the time), with additional damage likely coming from dissatisfaction.

The emotional stakes are also physiological. Unhelpful errors can produce stress responses—cortisol is mentioned as part of the body’s reaction—so users are more likely to give up when software fails and the message offers no path forward. That’s why error messages should be treated as a form of documentation, not an afterthought tied tightly to code.

At the core, an error message should contain three elements: a clear notification that something went wrong (avoiding silent failures), an explanation of the cause, and—most importantly—actionable resolution steps that help users fix the problem and prevent repeat failures. Common failure modes include jargon-heavy wording that users can’t interpret, ambiguity that raises more questions than answers, and “dead end” messages that offer no recovery instructions. Research from the University of Arizona, using a sample of 120 error messages over two months, found only 29 provided a solution—meaning fewer than one in four actually helped.

Improvement starts with audience awareness. An API error may target developers, but an interactive app error must work for everyday users, including administrators when access is restricted. Humility matters too: tech-support “pep kak” and “picnic” jokes are rejected as a model, because the real issue often lies in product design, UX, or documentation—not user behavior. Apologies can make messages feel more human, but they should be reserved for serious problems like data loss or inability to use the software; constant apologizing can feel insincere.

Blame language is another pitfall. Loaded terms like “illegal” or “fatal” can make users feel criminal, and studies cited in the talk link self-appraisal drops to error encounters. Instead, messages should focus on the problem and the fix.

Wording should be concise and readable. Shorter sentences correlate with higher comprehension, and modern users scan pages rather than reading everything—so long errors often hide the most important information. Clarity also means removing developer jargon and replacing it with concrete requirements (for example, specifying password rules in plain language rather than “validation” or internal “character groups”).

Human tone can be achieved without sacrificing accuracy. Empathy examples from Slack show how acknowledging frustration and offering a real remedy can improve user perception. Humor is possible but risky: jokes can fail under translation, wear out through overuse, or confuse users who lack cultural context. Easter-egg-style humor works best for rare, non-recurring errors.

Finally, accessibility and localization can’t be ignored. Color-based cues can break for color-blind users and can carry different meanings across cultures, so error states should rely on more than red/green. The talk recommends accessible patterns such as placing error summaries at the top for screen readers, using ARIA attributes to expose error details programmatically, and validating with tools like Chrome Lighthouse, WAVE, or WebAIM. The takeaway is a practical “HACK” approach: make errors Helpful, Humble, and Human, keep them concise and clear, and ensure accessibility and audience fit—so users can recover instead of rage-clicking support.

Cornell Notes

Error messages should function like micro-documentation: they must clearly notify users of a failure, explain why it happened, and—crucially—provide actionable steps to resolve the issue. Dead ends and jargon-heavy wording are common, and research cited (University of Arizona) found only 29 out of 120 sampled errors offered a solution. Effective messages are audience-aware, humble (avoid blame), and written in concise, plain language that reduces ambiguity. Tone matters too: apologies can help when problems are serious, while humor is high-risk because it can confuse or fail in translation. Accessibility and localization require more than color cues; errors should be readable by assistive technology using patterns like ARIA and should be tested with tools such as Lighthouse, WAVE, or WebAIM.

What are the three essential components of a strong error message, and why does the “solution” part matter most?

A strong error message includes: (1) a notification that something went wrong (since silent failures are worst), (2) an explanation of the cause, and (3) ideally a solution—useful, actionable information that lets the user resolve the error and prevent it from recurring. The talk emphasizes that many real-world errors fail at the third element: University of Arizona sampling found only 29 of 120 errors provided a solution, leaving users stuck and more likely to abandon the product or contact support.

How does humility change the wording of error messages?

Humility means not treating the user as the problem. The talk references common tech-support jokes (“pep kak” / “picnic”) to illustrate the wrong attitude—blaming the user for keyboard/computer issues. Instead, messages should focus on product/UI/UX/documentation causes and the path to recovery. It also recommends avoiding blameful language like “illegal,” because users already experience negative self-appraisal when errors occur.

Why are dead-end errors and ambiguity so damaging?

Dead ends are messages like “Sorry” or “Something went wrong” with no resolving steps, forcing users into guesswork or support channels. Ambiguity creates extra questions—for example, an error that says a PNG extension was used but offers unclear choices (“use PNG,” “cancel,” “use PNG”) doesn’t tell users what actually went wrong (rename vs convert vs corrupt file). Another example (“something is wrong with your requested resources”) fails to specify what resource is wrong or how to fix it, even when the underlying issue is something concrete like a non-unique API path.

What writing tactics improve comprehension and scanning for error messages?

The talk recommends concision and plain language. It cites correlations between shorter sentence length and higher comprehension (8 words or fewer: 100% comprehension; 14+ words: 90%; 43+ words: under 10%). It also notes that readers scan web text and may read only 20–28% of words on screen, so long errors can bury the key fix. Removing developer jargon (e.g., replacing “validation,” “character groups,” and “error code 400” with explicit password requirements) makes the message usable.

When is humor appropriate in error messages, and what risks come with it?

Humor can humanize messages, but it’s risky. The talk argues humor should be used cautiously—especially for frequent or frustrating errors—because it can confuse users who don’t share the cultural reference, and it can break under translation. It also notes that humor can wear out with repeated exposure, and that some “joke” errors become associated with repeated service failures, harming brand perception.

How should error messages be made accessible for users with disabilities?

Accessibility goes beyond color. The talk recommends: placing error summaries at the top so screen readers and keyboard users encounter them first; describing errors in clear language suitable for screen readers; and exposing error details to assistive technology using ARIA attributes (e.g., ARIA-described-by for password requirement errors). It also recommends testing with tools like Chrome Lighthouse, WAVE, or WebAIM to catch issues such as color contrast, missing alt attributes, and unlabeled form elements.

Review Questions

  1. What specific elements should an error message include to avoid becoming a dead end, and what research finding illustrates how often errors fail this test?
  2. How do humility and blame-free language change user perception, and what kinds of wording does the talk warn against?
  3. Give two reasons error messages should be concise, and one example of how jargon can be replaced with user-facing requirements.

Key Points

  1. 1

    Treat error messages as micro-documentation: they should notify, explain, and—most importantly—provide actionable recovery steps.

  2. 2

    Avoid dead ends and ambiguity; users need concrete resolution steps, not generic “something went wrong” text.

  3. 3

    Write for the audience: API errors may target developers, while interactive app errors must be understandable to everyday users.

  4. 4

    Use humble, blame-free language; reserve apologies for serious failures like data loss or inability to use the product.

  5. 5

    Keep error messages concise and plain-language; shorter sentences and scanning behavior make long, jargon-heavy errors easy to miss.

  6. 6

    Human tone can improve perception, but humor is high-risk due to translation, cultural context, and overuse—use it like an easter egg for rare cases.

  7. 7

    Make errors accessible and test them: don’t rely on color alone; use ARIA and validate with tools like Lighthouse, WAVE, or WebAIM.

Highlights

A 2003 “page is too large” message triggered hundreds of support contacts and was later estimated to cost about $50,000—showing how tiny wording choices can become expensive.
University of Arizona sampling found only 29 out of 120 error messages provided a solution, meaning most errors left users without a path to recovery.
Conciseness matters: the talk cites comprehension dropping sharply for long sentences (under 10% for 43+ words).
Humor can backfire—especially under translation or when errors are frequent—so it works best as a rare easter egg rather than a default tone.
Accessibility requires more than red/green: errors should be readable by assistive tech using patterns like ARIA and verified with tools such as Lighthouse, WAVE, or WebAIM.

Topics

  • Error Message Writing
  • Microcopy
  • Accessibility
  • Localization
  • UX Writing

Mentioned

  • James Scott
  • Emily Wilkes
  • Ben Iselle
  • Anna Picard
  • Douglas Edwards
  • Christopher Frey
  • Sean Ringtel
  • Emma
  • James Scott
  • API
  • UX
  • ARIA
  • HTML
  • CSS
  • ARIA-described-by
  • WAVE