What problem does it solve?
This skill helps you design and implement reliable error handling in .NET 10 APIs so failures become consistent, structured, and predictable responses instead of ad-hoc messages.
Core Features & Use Cases
- Result pattern for expected failures: Model business outcomes (e.g., not found, validation failure) without throwing exceptions.
- RFC 9457 ProblemDetails everywhere: Return errors in a standardized contract with type, title, status, detail, and optional per-field errors.
- Global exception handling for unexpected failures: Convert unhandled exceptions into ProblemDetails while avoiding sensitive information leakage.
- FluentValidation with endpoint filters: Validate requests at the API boundary and return validation problems cleanly.
- Typed error-to-HTTP mapping: Use strongly typed error objects/enums to translate domain errors into correct HTTP status codes.
Quick Start
When implementing an API endpoint, ask the AI to create a Result-based flow that converts known failures to ProblemDetails (RFC 9457) and installs a global exception handler for unexpected exceptions.