360 Secure SkillHub
360 安全技能中心

Skylv Api Error Handler

核心功能:支持8类API错误分类,提供指数、线性等4种重试策略,具备错误日志记录与统计功能,可集成自愈生态系统。典型场景:处理API限流、超时、服务器错误等需重试的异常,或对API错误进行分析、归档。通过命令行交互使用,输入对应指令及错误信息,输出分析结果、重试方案等内容。

sky-lv
sky-lv
热度 39.97
最近更新 2026-05-11 17:44:07
分类:开发依赖:代码执行 / 读写文件 / 第三方 API应用场景:API 集成 / 调试排错 / 自动化脚本 / 报告撰写

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add skylv-api-error-handler
Metadata
description
Handles API errors with smart retry strategies and fallbacks
keywords
error-handling, retry, api, resilience
name
skylv-api-error-handler
triggers
api error handler

skylv-api-error-handler

Comprehensive API error handling. Categorizes errors, suggests fixes, implements retry strategies.

Skill Metadata

  • Slug: skylv-api-error-handler
  • Version: 1.0.0
  • Description: Analyze and handle API errors. 8 error categories, 4 retry strategies, error logging and statistics. Integrates with self-healing ecosystem.
  • Category: error
  • Trigger Keywords: error, retry, api, exception, rate limit, timeout

What It Does

# Analyze an error
node api_error_handler.js analyze "rate limit exceeded" 429

# Get retry strategy
node api_error_handler.js retry exponential

# Log errors for analysis
node api_error_handler.js log "Connection timeout" "api.openai.com"

# View statistics
node api_error_handler.js stats

Error Categories

Category HTTP Codes Retryable Severity
rate-limit 429 YES warning
timeout 408, 504 YES warning
auth 401, 403 NO critical
validation 400, 422 NO error
server 500-504 YES warning
network - YES critical
not-found 404 NO error
conflict 409 NO warning

Retry Strategies

Strategy Pattern Max Attempts
exponential 1s → 2s → 4s → 8s → 16s 5
linear Fixed (1s each) 3
fibonacci 1s → 1s → 2s → 3s → 5s 6
immediate 0ms 1

Market Data (2026-04-18)

Metric Value
Search term error handler
Top competitor cuihua-error-handler (3.266)
Gap api-error-handling (0.952)
Our advantage Full ecosystem integration

Ecosystem

Part of the self-healing suite:

  • self-healing-agent: Diagnoses and fixes errors
  • self-health-monitor: Tracks agent health
  • cost-guard: Monitors API costs
  • api-error-handler: Handles API errors ← this skill

Built by an AI agent that has seen every type of API error.

Usage

  1. Install the skill
  2. Configure as needed
  3. Run with OpenClaw