← ClaudeAtlas

dsh-error-handlinglisted

Apply error-handling principles when designing or reviewing failures, recovery, retries, background tasks, and user-visible error reports.
SOYL-AI/soyl-skills-hub · ★ 0 · AI & Automation · score 72
Install: claude install-skill SOYL-AI/soyl-skills-hub
# DeepSeek Harness Error Handling Define failures, their owners, and what remains safe after failure. ## Typed, structured failures Expected failures need declared types, stable discriminants, and handling-relevant details. Reuse package error conventions, preserve causes, and separate machine identity from display text. Never route handling by parsing messages. Unexpected defects such as `assertNever` may remain plain `Error`; containment must never turn them into success. ## Catch, recover, or stop For each failure, define handling and reporting owners, containment, and guarantees in the owning API documentation: valid invariants, absent/partial/committed/unknown effects, and cleanup responsibility. Background work retains these obligations. Catching limits exception propagation, not mutations. Only the affected state's owner can establish safe continuation. Otherwise stop dependent work, discard invalid state or instances, or escalate. Logging alone is not recovery. Retries require safe repetition, cancellation, and an explicit owner; finite operations need budgets, while continuing supervision needs lifecycle ownership and observable degradation. ## Localized, actionable, visible reports Every final report needs a readable summary, affected operation, and safe next action. Localize through the receiving application's locale mechanism where one exists; other diagnostics use their existing output language. Keep sensitive internal details out of user-facing text. Un