Error Message Improvement
Transform technical error messages into user-friendly, actionable messages with clear guidance.
# Error Message Improvement
Transform technical, cryptic error messages into clear, user-friendly messages that help users understand what went wrong and how to fix it.
## Error Message Principles
### 1. Clarity
- Use plain language, avoid technical jargon
- Explain what happened in simple terms
- Be specific about the problem
- Avoid blame or negative tone
### 2. Actionability
- Tell users what they can do to fix it
- Provide step-by-step instructions
- Include links to relevant documentation
- Offer alternative solutions if available
### 3. Context
- Explain why the error occurred
- Show related information (file names, values)
- Include error codes for debugging
- Timestamp for tracking
### 4. Tone
- Empathetic and helpful
- Professional but human
- Avoid technical jargon
- Never blame the user
## Error Message Structure
Every error message should include:
1. **What happened** - Clear description of the problem
2. **Why it happened** - Brief explanation (if helpful)
3. **How to fix it** - Actionable steps
4. **Additional help** - Links, contact info, error codes
## Examples of Improvements
### Before and After
❌ **Before**: `ERR_INVALID_CREDENTIALS_401`
✅ **After**:
Unable to sign in
The email or password you entered is incorrect. Please try again.
Tips: • Check for typos in your email or password • Make sure Caps Lock is off • Reset your password if you’ve forgotten it
Need help? Contact support@example.com Error Code: AUTH-401
❌ **Before**: `NullPointerException at line 234`
✅ **After**:
Profile image missing
We couldn’t load your profile image. This might happen if the image was recently deleted or if there’s a connection issue.
What to do:
- Try refreshing the page
- Upload a new profile image
- Check your internet connection
If the problem continues, contact our support team.
❌ **Before**: `ECONNREFUSED Connection timeout`
✅ **After**:
Connection problem
We’re having trouble connecting to our servers. This is usually temporary.
Try these steps:
- Check your internet connection
- Refresh the page in a few seconds
- Try again in a minute
If you keep seeing this message, check our status page: status.example.com
Error: CONN-503
## Error Types and Templates
### Validation Errors
**Email Format**
Please enter a valid email address
The email address you entered doesn’t look quite right. Make sure it includes an @ symbol and a domain (like email@example.com)
**Password Requirements**
Password doesn’t meet requirements
Your password needs to: • Be at least 8 characters long • Include at least one uppercase letter • Include at least one number • Include at least one special character (!@#$%^&*)
**File Upload**
File too large
The file you’re trying to upload is larger than our 10MB limit.
Solutions: • Compress the file before uploading • Use a file sharing service for large files • Contact us if you need to upload larger files
File size: 15.3 MB | Limit: 10 MB
### System Errors
**500 Internal Server Error**
Something went wrong on our end
We’re sorry, but something unexpected happened. Our team has been notified and is working on it.
What you can do: • Try refreshing the page • Come back in a few minutes • Save your work if you’re in the middle of something
Need immediate help? Contact support@example.com
Reference: ERR-500-2025-10-15-12345
**Database Connection Error**
Temporary service interruption
We’re having trouble connecting to our database. This is usually resolved quickly.
Your data is safe. Please:
- Wait a moment and try again
- Check our status page: status.example.com
- Contact support if this persists
Incident ID: DB-503-20251015
### Permission Errors
**Access Denied**
You don’t have permission to access this
This page or feature is only available to [role/plan] users.
To get access: • Upgrade your account • Contact your team administrator • Request access from [email]
Learn more about permissions: help.example.com/permissions
### Network Errors
**Offline**
You’re offline
It looks like you’ve lost internet connection.
Once you’re back online: • This page will automatically reload • Your unsaved changes are stored locally • No data has been lost
Check your network connection or try: • Switching from WiFi to mobile data • Restarting your router • Moving closer to your WiFi router
## Best Practices Checklist
- [ ] Message is written for non-technical users
- [ ] Clear explanation of what went wrong
- [ ] Actionable steps to resolve the issue
- [ ] Friendly, helpful tone (not blaming)
- [ ] Includes error code for support reference
- [ ] Links to relevant documentation
- [ ] Tested with real users
- [ ] Reviewed for accessibility
- [ ] Localized for different languages
- [ ] Includes support contact information
## Anti-Patterns to Avoid
❌ **Don't**:
- Use technical jargon or code
- Blame the user ("You entered...")
- Be vague ("Something went wrong")
- Use all caps or excessive punctuation
- Show stack traces to end users
- Use humor that might offend
- Make promises you can't keep
✅ **Do**:
- Use simple, clear language
- Be specific about the problem
- Offer helpful solutions
- Be empathetic and professional
- Provide technical details separately
- Include support options
- Set realistic expectations
## Context-Specific Considerations
### Mobile Apps
- Keep messages shorter
- Use native OS patterns
- Consider limited screen space
- Provide tap-to-copy for error codes
### APIs
- Return structured error objects
- Include error codes and types
- Provide detailed descriptions for developers
- Link to API documentation
### CLI Tools
- Format for terminal display
- Include command suggestions
- Show help flags
- Support --verbose for details
## Testing Error Messages
- Show to non-technical users
- Verify all links work
- Test on different devices/browsers
- Check accessibility with screen readers
- Translate and localize
- Monitor support tickets for confusion