error-handling-logging-patterns
Installation
SKILL.md
Error Handling & Logging Patterns
Build systems that are debuggable in production through structured logging and intentional error handling.
Error Hierarchy Design
Custom Exception Classes
class AppError(Exception):
"""Base error for the application."""
def __init__(self, message: str, code: str = "INTERNAL_ERROR", status: int = 500):
self.message = message
self.code = code
self.status = status
super().__init__(message)