Middleware to catch custom or accidental exceptions
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