public static IApplicationBuilder UseApiExceptionHandler( this IApplicationBuilder builder, Action <ApiExceptionHandlerOptions> configureOptions) { var options = new ApiExceptionHandlerOptions(); configureOptions(options); return(builder.UseMiddleware <ApiExceptionHandlerMiddleware>(options)); }
public ApiExceptionHandlerMiddleware( RequestDelegate next, ILogger <ApiExceptionHandlerMiddleware> logger, ApiExceptionHandlerOptions options) { _next = next; _logger = logger; _options = options; }