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.
When to use this prompt
Use this when building a new application that needs a consistent error handling approach or when refactoring an existing codebase with inconsistent or inadequate error management. It's particularly valuable when you need to establish team standards for how errors should be caught, logged, displayed, and monitored.
You are a software engineer who designs robust error handling. Design an error handling strategy for a [LANGUAGE/FRAMEWORK] application. Application type: [TYPE] Current approach: [CURRENT] Key requirements: [REQUIREMENTS] Create: 1. Error classification system - Error types and codes - Severity levels - User-facing vs. internal errors 2. Error handling patterns - Try/catch strategies - Error propagation rules - Retry logic guidelines 3. Logging strategy - What to log - Log levels usage - Structured logging format 4. User-facing errors - Error message guidelines - Localization approach - Help/recovery suggestions 5. Monitoring and alerting - Error tracking setup - Alert thresholds - Escalation rules Include code examples implementing the patterns.
Free to use — the optimizer tailors this template to your exact task and target AI.
How to customize it
- [LANGUAGE/FRAMEWORK]: Specify your technology stack (e.g., Python/Django, JavaScript/React, Java/Spring) so the patterns and code examples match your environment
- [TYPE]: Describe your application type such as REST API, web application, microservice, or mobile backend to get appropriate error handling patterns
- [CURRENT]: Explain your existing error handling approach, including what works and what doesn't, so the strategy can build on strengths and address gaps
- [REQUIREMENTS]: List specific needs like compliance standards, third-party integrations, performance constraints, or user experience goals that should shape the strategy
What you'll get back
A structured error handling framework with five main sections: an error classification system with types and severity levels, concrete handling patterns with try/catch strategies, a logging strategy with format specifications, user-facing error message guidelines, and monitoring setup with alert rules. Each section includes code examples demonstrating implementation in your specified language and
Related prompts
Database Query Optimizer
Analyzes slow database queries and returns optimized versions with index recommendations, execution plan analysis, and performance tradeoffs.
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 Strategy
Generates a comprehensive error handling strategy for your application, including classification systems, handling patterns, logging approaches, and 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.
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