1 write to _options
Microsoft.AspNetCore.Diagnostics (1)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
43
_options
= options.Value;
15 references to _options
Microsoft.AspNetCore.Diagnostics (15)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (15)
51
if (
_options
.ExceptionHandler == null)
53
if (
_options
.ExceptionHandlingPath == null)
62
_options
.ExceptionHandler = _next;
141
if (
_options
.ExceptionHandlingPath.HasValue)
143
context.Request.Path =
_options
.ExceptionHandlingPath;
145
var oldScope =
_options
.CreateScopeForErrors ? context.RequestServices : null;
146
await using AsyncServiceScope? scope =
_options
.CreateScopeForErrors ? context.RequestServices.GetRequiredService<IServiceScopeFactory>().CreateAsyncScope() : null;
167
context.Response.StatusCode =
_options
.StatusCodeSelector?.Invoke(edi.SourceException) ?? DefaultStatusCode;
184
if (
_options
.ExceptionHandler is not null)
186
await
_options
.ExceptionHandler!(context);
191
if (
_options
.ExceptionHandlingPath.HasValue)
194
handlerTag =
_options
.ExceptionHandlingPath.Value;
218
if (result != ExceptionHandledType.Unhandled ||
_options
.StatusCodeSelector != null || context.Response.StatusCode != StatusCodes.Status404NotFound ||
_options
.AllowStatusCode404Response)
225
if (
_options
.SuppressDiagnosticsCallback is { } suppressCallback)