Individual skill

dsh-error-handling

实现或审查错误传播、部分成功、结果未知、恢复、重试、取消或失败反馈时使用,明确状态保证和错误处理责任。

skills/dsh-error-handling/SKILL.md

Read pinned source

Source commit a8cee8831f288376b8cc5d7d0d28485a03911c1e

What was checked

Matches the observed repository HEAD
Yes
Scanner rules are current
Yes
Repository scan complete
No
Skill scan complete
Yes
Observed behavior
Instructions only
Last checked
Nov 9, 2026

These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.

Install this skill

Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.

An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.

Repository context

Repository stars (not skill ratings)
1,868
Repository last updated
Nov 1, 2026
License
MIT

Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.

Files and excerpt

File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.

Browse files
Read excerpt

# 明确失败行为及处理责任

阅读[项目上下文](references/project-context.md)、[生命周期](references/lifecycle.md)和[验证证据](references/evidence.md)。沿用项目现有的错误约定。

1. 追踪操作的公开入口、状态负责方、外部副作用和最终报告。建立简短对应关系:触发条件 → 错误分类 → 状态保证 → 处理者 → 用户可见结果。区分响应失败与操作失败。
2. 用稳定标识区分已知业务错误;保留意外错误的原因,不把所有异常都转成成功默认值或同一个通用业务错误码。
3. 明确失败后状态属于未变化、部分完成、已提交还是结果未知。只有状态负责方能证明恢复和继续执行的前提;无法证明时停止依赖该状态的后续工作。写入结果不明确时,使用真实服务支持的核对或幂等机制,不能仅根据异常文字无条件重试。
4. 确保取消、回调错误和清理失败到达适当的处理位置。避免重复报告;保留足够的处理线索,不泄露秘密。
5. 通过真实调用方验证副作用发生前后的失败,包括“已经提交但响应丢失”。分别断言可观察状态和报告内容;支持恢复时,覆盖恢复成功和恢复失败。

完成时说明明确的状态保证、负责的处理者和实际测试的失败场景。服务行为约定不足以建立保证时,如实报告结果未知。
Back to top