What problem does it solve?
Standardizes error handling across domain exceptions, ProblemDetails, and RpcException mapping for .NET services.
Core Features & Use Cases
- Domain exception hierarchy including DomainException, NotFoundException, ValidationException, and ConcurrencyException to express precise failure modes.
- IProblemDetailsProvider-compatible exceptions to produce rich REST error responses with proper Type, Title, Status, and Detail.
- gRPC interceptor (ApplicationExceptionInterceptor) that translates DomainException instances into RpcException with problem-details-bin metadata and status mapping.
- Centralized status-code mapping between HTTP status codes and gRPC StatusCode for consistent client experiences.
- Structured error logging with contextual properties (e.g., ErrorCode, Entity names, identifiers) to enable effective traceability.
- Best-practice guidance and anti-patterns to avoid generic, uninformative errors.
Quick Start
Install and wire the error-handling primitives into your .NET service, register the interceptor, and enforce the ProblemDetails-based responses for REST and gRPC callers.