返回顶部
e

error-handling

Deep error handling workflow—taxonomy, user-visible vs internal errors, retries and idempotency, observability, and supportability. Use when standardizing failure modes across APIs, clients, and async workers.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
160
下载量
0
收藏
概述
安装方式
版本历史

error-handling

# Error Handling Consistent errors reduce support load and on-call pain. Design a **taxonomy**, **stable codes**, **safe user messaging**, and **operator visibility**—without leaking secrets or stack traces to clients. ## When to Offer This Workflow **Trigger conditions:** - Inconsistent HTTP status codes and response bodies - Retry storms or duplicate side effects from naive retries - Logs that cannot be tied to user-visible failures **Initial offer:** Use **six stages**: (1) classify errors, (2) map to transport, (3) user messaging, (4) retries & idempotency, (5) observability, (6) client SDKs & DX). Confirm REST/GraphQL/gRPC and sync/async patterns. --- ## Stage 1: Classify Errors **Goal:** Distinguish validation, authentication, authorization, not found, conflict, rate limit, dependency failure, and internal bugs. **Exit condition:** Table or enum of codes with owning team and meaning. --- ## Stage 2: Map to Transport **Goal:** Correct HTTP 4xx/5xx; GraphQL errors with extensions; gRPC status codes; optional RFC 7807 Problem Details for JSON APIs. --- ## Stage 3: User Messaging **Goal:** Actionable copy for end users; opaque support reference id; no internal hostnames, SQL fragments, or stack traces in client responses. --- ## Stage 4: Retries & Idempotency **Goal:** Retry only safe or idempotent operations; exponential backoff with jitter; align with **idempotency** keys on writes. --- ## Stage 5: Observability **Goal:** Structured logs with `error.code`, `trace_id`, `user_id` (where allowed); metrics by error class; alerts on error-rate SLO burn. --- ## Stage 6: Client SDKs & DX **Goal:** Typed errors in SDKs; documented recovery; map codes to user-facing strings in apps consistently. --- ## Final Review Checklist - [ ] Taxonomy and ownership defined - [ ] Transport mapping correct and consistent - [ ] User-safe messages with correlation ids - [ ] Retry policy matches idempotency story - [ ] Logs and metrics wired for ops ## Tips for Effective Guidance - Separate expected validation errors from unexpected 500s in dashboards. - Pair with **idempotency** for write paths and queues. ## Handling Deviations - Mobile offline: queue with explicit user-visible sync state.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 error-handling-1776028627 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 error-handling-1776028627 技能

通过命令行安装

skillhub install error-handling-1776028627

下载 Zip 包

⬇ 下载 error-handling v1.0.0

文件大小: 1.85 KB | 发布时间: 2026-4-13 10:11

v1.0.0 最新 2026-4-13 10:11
Initial public release introducing a comprehensive error-handling workflow across APIs and async workers.

- Defines a six-stage process: error classification, transport mapping, user messaging, retries & idempotency, observability, and client SDK support.
- Guides on building a stable taxonomy of error codes with operator visibility and safe user messages.
- Provides clear recommendations for retry patterns and aligning idempotency in distributed systems.
- Emphasizes structured logging, metrics by error class, and actionable user feedback.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部