ApiBehaviorOptions.ClientErrorMapping 属性

定义

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

可以通过重置 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)

属性值

适用于