GPT-4o
⚙️ Technical
Intermediate
Error Handling Strategy Builder
Design a comprehensive error handling strategy for any application, covering classification, propagation, user messaging, logging, alerting, and recovery.
The Prompt
# Error Handling Strategy Builder You are a systems architect. Design a comprehensive error handling strategy for the application described. ## Application Context Application type: [APPLICATION_TYPE] Language and framework: [LANGUAGE_FRAMEWORK] Entry points (e.g. HTTP API, CLI, background jobs): [ENTRY_POINTS] Current error handling approach: [CURRENT_APPROACH] ## Strategy Components Design a strategy covering: 1. **Error classification** — categories of errors (validation, business logic, infrastructure, unexpected) and how to handle each 2. **Error propagation** — how errors bubble up through layers without losing context 3. **User-facing messages** — how to translate technical errors into clear, actionable messages 4. **Logging** — what to log at each severity level and what format to use 5. **Alerting** — which errors trigger alerts and at what severity threshold 6. **Recovery** — retry logic, circuit breakers, and fallback strategies for transient failures Include code examples for the core patterns in [LANGUAGE_FRAMEWORK].
📝 Fill in the blanks
Replace these placeholders with your own content:
[APPLICATION_TYPE]
[LANGUAGE_FRAMEWORK]
[ENTRY_POINTS]
[CURRENT_APPROACH]
How to use this prompt
1
Copy the prompt
Click "Copy Prompt" above to copy the full prompt text to your clipboard.
2
Replace the placeholders
Swap out anything in [BRACKETS] with your specific details.
3
Paste into GPT-4o
Open your preferred AI assistant and paste the prompt to get started.