public ErrorHandlerMiddleware(RequestDelegate next,
                               ILogger <ErrorHandlerMiddleware> logger)
 {
     _next   = next.CheckIfNotEmpty();
     _logger = logger.CheckIfNotEmpty();
 }