Install any skill in seconds. Free to start, no credit card required.
Get Started Free →cloudai-x/error-handling
Implements error handling patterns, structured logging, retry strategies, circuit breakers, and graceful degradation.
Passed 19 of 22 test cases with the skill, and 16 of 22 without it.
and 3 more in the full report
4 fixed15 passed either way2 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 4 test cases the skill fixed. Same model, same prompt, with and without the skill.
I'm refactoring an Express server written in TypeScript. Could you help me write a custom error handling setup? I need a base custom error class for operational exceptions, specialized subclasses for common issues like bad inputs or missing resources, and a centralized Express error-handling middleware that logs error details properly without exposing raw internal details to the client. Please also show how to attach a unique correlation ID to each incoming request and output structured JSON logs.
| Checked | Without skill | With skill |
|---|---|---|
| The custom AppError class includes a code property. | Missed | Passed |
| The operational error response payload wraps details inside a top-level error object. | Missed | Passed |
| The correlation ID context is stored using AsyncLocalStorage. | Missed | Passed |
The instructions your model reads when the skill loads.
Copy this checklist and track progress:
Error Handling Progress:
- [ ] Step 1: Define error taxonomy (categories and severity)
- [ ] Step 2: Implement error handling by layer
- [ ] Step 3: Set up structured logging
- [ ] Step 4: Add retry and circuit breaker patterns
- [ ] Step 5: Configure error tracking service
- [ ] Step 6: Define user-facing error messages
- [ ] Step 7: Validate against anti-patterns checklist
// Custom error hierarchy
class AppError extends Error {
constructor(
message: string,
public statusCode: number = 500,
public code: string = "INTERNAL_ERROR",
public isOperational: boolean = true,
) {
super(message);
this.name = this.constructor.name;
}
}
class NotFoundError extends AppError {
test cases passed, vs 16 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.