public Task HandleExceptionAsync(ErrorContext context, Func <ErrorContext, Task> next)
 {
     return(next(context));
 }
 public Task HandleExceptionAsync(ErrorContext context, Func <ErrorContext, Task> next)
 {
     return(context.HttpContext.Response.WriteAsync("An error occurred"));
 }
 public Task HandleExceptionAsync(ErrorContext context, Func <ErrorContext, Task> next)
 {
     return(next(new ErrorContext(context.HttpContext, new FormatException("Bad format exception!"))));
 }
 public Task HandleExceptionAsync(ErrorContext context, Func <ErrorContext, Task> next)
 {
     return(context.HttpContext.Response.WriteAsync(context.Exception.ToString()));
 }