CLAUDE.md · CLAUDE.md (Project)
Error Handling Standards
Define error handling conventions for the project
errorsconventionsreliability
Template content
# Error Handling
- Use custom error classes that extend Error
- Always include error context (what operation failed, with what inputs)
- Log errors with structured logging (JSON format)
- Never swallow errors silently
- Use Result types for expected failures, throw for unexpected ones
- API errors should return consistent format: { error: string, code: string, details?: object }
- Include correlation IDs in error responses for tracingUse this template in the editor
Open PromptEditor.io to customize this template, save it, and inject it into any AI chat.
Open the editor