Error Handling Strategy
Generates a comprehensive error handling strategy for your application, including classification systems, handling patterns, logging approaches, and code examples.
When to use this prompt
Use this when architecting error handling for a new application or standardizing how an existing system catches, logs, and communicates errors. It's particularly valuable when you need to establish consistent practices across a codebase or team.
You are a software architect designing error handling systems. Design an error handling strategy for [APPLICATION TYPE]. Context: - Language/framework: [LANGUAGE] - Architecture: [MONOLITH/MICROSERVICES] - Error sources: [SOURCES] - User types: [USERS] Create: 1. Error classification - Error types and categories - Severity levels - User-facing vs internal 2. Handling patterns - Try-catch strategies - Error boundaries - Graceful degradation - Circuit breakers 3. Error objects - Standard error format - Error codes system - Internationalization 4. Logging strategy - What to log - Log levels - Structured logging format - PII handling 5. User communication - Error message guidelines - User-friendly messages - Retry guidance 6. Monitoring & alerting - Error tracking setup - Alert thresholds - Escalation paths 7. Code examples - Implementation patterns - Middleware setup - Testing approaches
Free to use — the optimizer tailors this template to your exact task and target AI.
How to customize it
- [APPLICATION TYPE] — Specify the kind of software you're building (e.g., REST API, web app, mobile backend, data pipeline)
- [LANGUAGE] — Enter your programming language and framework (e.g., Python/Django, Node.js/Express, Java/Spring Boot)
- [MONOLITH/MICROSERVICES] — Indicate your architectural pattern, which affects how errors propagate and where boundaries exist
- [SOURCES] — List where errors originate in your system (e.g., database connections, third-party APIs, user input validation, file operations)
What you'll get back
A structured error handling strategy document covering seven areas: error classification with severity levels, handling patterns like circuit breakers and error boundaries, standardized error object formats with codes, logging strategy including PII considerations, user-facing message guidelines, monitoring and alerting configuration, and concrete code examples showing implementation patterns and
Related prompts
Design Production-Ready Database Schemas with Migrations
Generates complete database schemas with tables, relationships, indexes, migration scripts, and performance optimizations tailored to your application's data patterns.
Entity-Relationship Schema Builder for Any Database
Generates a complete database schema with ER diagrams, table definitions, indexes, normalization analysis, and migration strategy for your application.
Error Handling Framework
Generates a complete error handling strategy for your application, including classification systems, handling patterns, logging, user messages, and monitoring setup with code examples.
Git Commit Message Writer
Generates three git commit message options from your code changes, following conventional commits format with type, scope, subject, body, and footer.
GraphQL Schema Builder
Generates a complete GraphQL schema with types, queries, mutations, and subscriptions tailored to your data model and operations.
Legacy Code Modernization
Generates a structured modernization plan for legacy code, including assessment, migration options, phased implementation, testing strategy, and risk management.
Make this prompt yours
PromptWizz rewrites this template around your specific task, audience, and target AI — and shows you why each change works.
Try the Optimizer Free