Custom Exception Middleware Versions Save

Middleware to catch custom or accidental exceptions

v1.3.0

4 months ago
  • Upgrade package to .NET 8
  • Update nuget packages dependencies

v1.2.1

1 year ago

Add support to UnauthorizedException

Exception Status code description Status code
UnauthorizedException Unauthorized 401

Throw exception

throw new UnauthorizedException("Custom unauthorized exception message");

v1.2.0

2 years ago
  • Upgrade package to .NET 6
  • Update nuget packages dependencies
  • Improve examples summary

v1.1.7

2 years ago
  • It's possible to customize the exception type when throw an exception, just pass the type in an exception constructor.

    throw new CustomDomainException("Custom domain exception message", "OTHER_CUSTOM_TYPE");
    
  • The namespace for CustomErrorResponse class has been changed, the right path is CustomExceptionMiddleware.Responses