ApiBehaviorOptions.ClientErrorMapping 属性

定义

获取 HTTP 状态代码到 ClientErrorData的映射。 配置的值用于转换为IClientErrorActionResultObjectResult实例。ValueProblemDetails

可以通过重置 SuppressMapClientErrors来禁用此功能。

public:
 property System::Collections::Generic::IDictionary<int, Microsoft::AspNetCore::Mvc::ClientErrorData ^> ^ ClientErrorMapping { System::Collections::Generic::IDictionary<int, Microsoft::AspNetCore::Mvc::ClientErrorData ^> ^ get(); };
public System.Collections.Generic.IDictionary<int,Microsoft.AspNetCore.Mvc.ClientErrorData> ClientErrorMapping { get; }
member this.ClientErrorMapping : System.Collections.Generic.IDictionary<int, Microsoft.AspNetCore.Mvc.ClientErrorData>
Public ReadOnly Property ClientErrorMapping As IDictionary(Of Integer, ClientErrorData)

属性值

IDictionary<Int32,ClientErrorData>

适用于