skills/smithery.ai/error-handling-patterns

error-handling-patterns

SKILL.md

Error Handling Patterns

Use this skill when implementing error handling for features or API endpoints.

Checklist

Exception Handling Rules

  • Never use bare except - always specify exception type
  • Catch specific exceptions first, then broader ones
  • Use domain-specific exception classes with meaningful names
  • Log errors before re-raising or returning error responses

Domain-Specific Exceptions

  • Create custom exception classes that extend built-in exceptions
  • Use meaningful exception names that describe the error condition
  • Include helpful error messages with context
Installs
14
First Seen
Mar 21, 2026