Share via


ProblemDetailsFactory.CreateProblemDetails Method

Definition

Creates a ProblemDetails instance that configures defaults based on values specified in ApiBehaviorOptions.

public abstract Microsoft.AspNetCore.Mvc.ProblemDetails CreateProblemDetails (Microsoft.AspNetCore.Http.HttpContext httpContext, int? statusCode = default, string title = default, string type = default, string detail = default, string instance = default);
public abstract Microsoft.AspNetCore.Mvc.ProblemDetails CreateProblemDetails (Microsoft.AspNetCore.Http.HttpContext httpContext, int? statusCode = default, string? title = default, string? type = default, string? detail = default, string? instance = default);
abstract member CreateProblemDetails : Microsoft.AspNetCore.Http.HttpContext * Nullable<int> * string * string * string * string -> Microsoft.AspNetCore.Mvc.ProblemDetails
Public MustOverride Function CreateProblemDetails (httpContext As HttpContext, Optional statusCode As Nullable(Of Integer) = Nothing, Optional title As String = Nothing, Optional type As String = Nothing, Optional detail As String = Nothing, Optional instance As String = Nothing) As ProblemDetails

Parameters

httpContext
HttpContext

The HttpContext.

statusCode
Nullable<Int32>

The value for Status.

title
String

The value for Title.

type
String

The value for Type.

detail
String

The value for Detail.

instance
String

The value for Instance.

Returns

The ProblemDetails instance.

Applies to