hello-errors

SkillMonitoring & ops

Use when implementing error handling, try-catch, logging, monitoring, retry logic, fallback mechanisms, or handling error responses and exception management.

Use hello-errors in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add hello-errors and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

Then ask your AI: use the hello-errors skill

Details

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.

hello-errorsStart free

What this skill tells your AI

The instructions your AI receives, as published by hellowind777/helloagents in skills/hello-errors/SKILL.md and read by ahel’s review.

错误处理相关代码必须遵循以下规范。

编码前

先分类可预期错误 vs 不可预期错误,再写代码。

错误分类

  • 可预期错误(验证失败、资源不存在)→ 正常处理,返回友好信息
  • 不可预期错误(系统故障、第三方宕机)→ 记录日志,返回通用错误
  • 不要用 try-catch 包裹所有代码——只捕获你能处理的

结构化错误

  • 统一错误格式:{ code, message, details? }
  • HTTP 状态码准确:4xx 客户端错误,5xx 服务端错误
  • 不暴露内部实现细节(堆栈、SQL、文件路径)给用户
  • 错误码可枚举,便于前端处理

日志规范

  • 结构化日志(JSON),包含 timestamp、level、context
  • 错误日志包含:堆栈、请求 ID、用户上下文
  • 敏感信息脱敏后再记录(密码、token、身份证)
  • 日志级别:error(必须处理)> warn(需关注)> info(正常流程)> debug(调试)

恢复策略

  • 外部调用:超时 + 重试(指数退避,最多 3 次)
  • 关键操作:幂等设计,支持安全重试
  • 优雅降级:部分功能不可用时不影响核心流程
  • 断路器:连续失败超过阈值时快速失败

交付检查

  • 错误响应格式统一
  • 不暴露内部细节给用户
  • 外部调用有超时设置
  • 敏感信息已脱敏
  • 无静默失败:无空 catch 吞错误、无静默降级、无静默回退(见 HelloAGENTS“失败处理”)

Signals

GitHub stars
704
Forks
97
Last commit
Sep 2026
Advanced
Item type
skill
Key
hello-errors
Source
github.com/hellowind777/helloagents