共用方式為


TypedResults.InternalServerError 方法

定義

多載

InternalServerError()

產生 Status500InternalServerError 回應。

InternalServerError<TValue>(TValue)

產生 Status500InternalServerError 回應。

InternalServerError()

產生 Status500InternalServerError 回應。

public static Microsoft.AspNetCore.Http.HttpResults.InternalServerError InternalServerError ();
static member InternalServerError : unit -> Microsoft.AspNetCore.Http.HttpResults.InternalServerError
Public Shared Function InternalServerError () As InternalServerError

傳回

為回應建立的 InternalServerError

適用於

InternalServerError<TValue>(TValue)

產生 Status500InternalServerError 回應。

public static Microsoft.AspNetCore.Http.HttpResults.InternalServerError<TValue> InternalServerError<TValue> (TValue? error);
static member InternalServerError : 'Value -> Microsoft.AspNetCore.Http.HttpResults.InternalServerError<'Value>
Public Shared Function InternalServerError(Of TValue) (error As TValue) As InternalServerError(Of TValue)

類型參數

TValue

將 JSON 串行化為響應主體的錯誤物件類型。

參數

error
TValue

要包含在 HTTP 回應本文中的值。

傳回

為回應建立的 InternalServerError<TValue>

適用於