1 write to _options
Microsoft.AspNetCore.Diagnostics (1)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
43
_options
= options.Value;
12 references to _options
Microsoft.AspNetCore.Diagnostics (12)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (12)
51
if (
_options
.ExceptionHandler == null)
53
if (
_options
.ExceptionHandlingPath == null)
62
_options
.ExceptionHandler = _next;
142
if (
_options
.ExceptionHandlingPath.HasValue)
144
context.Request.Path =
_options
.ExceptionHandlingPath;
146
var oldScope =
_options
.CreateScopeForErrors ? context.RequestServices : null;
147
await using AsyncServiceScope? scope =
_options
.CreateScopeForErrors ? context.RequestServices.GetRequiredService<IServiceScopeFactory>().CreateAsyncScope() : null;
168
context.Response.StatusCode =
_options
.StatusCodeSelector?.Invoke(edi.SourceException) ?? DefaultStatusCode;
185
if (
_options
.ExceptionHandler is not null)
187
await
_options
.ExceptionHandler!(context);
205
if (context.Response.HasStarted || handled ||
_options
.StatusCodeSelector != null || context.Response.StatusCode != StatusCodes.Status404NotFound ||
_options
.AllowStatusCode404Response)