Share via


RouteHandlerOptions.ThrowOnBadRequest 属性

定义

控制终结点在处理无效请求时是否应引发 BadHttpRequestException ,以及写入 Debug 日志。

public bool ThrowOnBadRequest { get; set; }
member this.ThrowOnBadRequest : bool with get, set
Public Property ThrowOnBadRequest As Boolean

属性值

注解

默认为 IsDevelopment(IHostEnvironment)

适用于