共用方式為


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)

屬性值

適用於