Progressive Disclosure in Errors
You'll learn how to layer error information so users see simple, actionable messages first, with technical details available on demand.
The Core Idea
Progressive disclosure in error handling means showing the minimum necessary information upfront, then revealing more technical or detailed data only when the user (or support team) needs it. Think of it like a news article: headline first, then summary, then full details if you're interested.
Most users just want to know what went wrong and what to do next. They don't need stack traces, HTTP status codes, or internal error IDs cluttering their screen. However, developers debugging issues or support staff helping users do need those details.
How It Works
Start with a friendly, jargon-free message:
"We couldn't save your changes. Please try again."
Then provide access to more information through progressive layers:
// Simple message shown by default
const errorDisplay = {
message: "We couldn't save your changes. Please try again.",
// Available via "Show details" toggle
details: "The server returned a 503 error. This usually means temporary maintenance.",
// Available via "Technical info" expansion
technical: {
statusCode: 503,
requestId: "req_7x9k2m",
timestamp: "2024-01-15T10:30:45Z",
endpoint: "/api/users/profile"
}
};
This pattern respects your users' attention while giving power users and support teams the tools they need. The simple message keeps non-technical users calm and informed, while the hidden layers provide debugging ammunition without overwhelming the interface.
Key Takeaway: Show users simple, helpful error messages first, then provide expandable sections for technical details that developers or support teams might need—don't dump everything at once.