RouteHandlerOptions.ThrowOnBadRequest Property

Definition

Controls whether endpoints should throw a BadHttpRequestException in addition to writing a Debug log when handling invalid requests.

public bool ThrowOnBadRequest { get; set; }

Property Value

Remarks

Defaults to IsDevelopment(IHostEnvironment).

Applies to

Product Versions
ASP.NET Core 6.0, 7.0, 8.0, 9.0