一键导入
error-handling-strategies
Implement robust error handling with proper validation, recovery mechanisms, and clear feedback for system stability
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Implement robust error handling with proper validation, recovery mechanisms, and clear feedback for system stability
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Design AI agents with appropriate capabilities, tools, and personas for specific software development tasks
Design RESTful APIs with proper resource modeling, HTTP methods, error handling, and clear contracts following REST principles
Document APIs comprehensively with signatures, parameters, return values, errors, and working code examples for developer reference
Implement robust third-party API integrations with proper authentication, error handling, and rate limiting
Apply proven architectural patterns (MVC, layered, microservices) to create maintainable systems with clear separation of concerns
Systematically reproduce, diagnose, and analyze bugs to determine root cause, assess severity, and plan fix strategy
| name | Error Handling Strategies |
| description | Implement robust error handling with proper validation, recovery mechanisms, and clear feedback for system stability |
| category | implementation |
| required_tools | ["Read","Write","Edit","Grep"] |
Implement robust error handling that gracefully manages failures, provides clear feedback, and maintains system stability.
Context: File reading operation
def read_config(filepath):
try:
with open(filepath, 'r') as f:
return json.load(f)
except FileNotFoundError:
logger.error(f"Config file not found: {filepath}")
return get_default_config()
except json.JSONDecodeError as e:
logger.error(f"Invalid JSON in {filepath}: {e}")
raise ConfigurationError(f"Config file is malformed at line {e.lineno}")
except PermissionError:
logger.error(f"Cannot read {filepath}: Permission denied")
raise ConfigurationError(f"Insufficient permissions for {filepath}")