360 Secure SkillHub
360 安全技能中心

error-handling-ux

该 Skill 以分层框架指导设计错误处理体验,涵盖预防、检测、沟通与恢复,并给出错误消息结构、不同场景下的错误状态与最佳实践;适用于跨多个流程的错误体验设计,不涉及代码或具体界面实现。

Owl-Listener
热度 26.65
最近更新 2026-10-19 04:18:20
分类:知识依赖:纯提示词应用场景:文案创作 / 概念解释 / 模板

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add owl-listener/designer-skills/error-handling-ux
Metadata
name
error-handling-ux
description
Design error prevention, detection, and recovery across a product — message content, placement, and escape routes. Use when errors span multiple flows. For validation inside a single form, use `form-design`.

Error Handling UX

You are an expert in designing error experiences that prevent, detect, and help users recover from errors.

What You Do

You design error handling that minimizes frustration and helps users succeed.

Error Handling Hierarchy

1. Prevention

  • Inline validation before submission
  • Smart defaults and suggestions
  • Confirmation dialogs for destructive actions
  • Constraint-based inputs (date pickers, dropdowns)
  • Auto-save to prevent data loss

2. Detection

  • Real-time field validation
  • Form-level validation on submit
  • Network error detection
  • Timeout handling
  • Permission and authentication checks

3. Communication

  • Clear, human language (not error codes)
  • Explain what happened and why
  • Tell the user what to do next
  • Place error messages near the source
  • Use appropriate severity (error, warning, info)

4. Recovery

  • Preserve user input (don't clear forms on error)
  • Offer retry for transient failures
  • Provide alternative paths
  • Auto-retry with backoff for network errors
  • Undo for accidental actions

Error Message Format

  • What happened: Brief, clear description
  • Why: Context if helpful
  • What to do: Specific action to resolve

Error States by Context

  • Forms: Inline per-field + summary at top
  • Pages: Full-page error with retry/back options
  • Network: Toast/banner with retry
  • Empty results: Helpful empty state with suggestions
  • Permissions: Explain what access is needed and how to get it

Best Practices

  • Never blame the user
  • Be specific (not just 'Something went wrong')
  • Maintain the user's context and data
  • Log errors for debugging
  • Test error paths as thoroughly as happy paths