Class ErrorOptions.ProblemDetailsConfig
global settings for ProblemDetails error responses.
Inherited Members
Namespace: FastEndpoints
Assembly: FastEndpoints.dll
Syntax
public sealed class ErrorOptions.ProblemDetailsConfig
Properties
AllowDuplicateErrors
controls whether duplicate errors with the same name should be allowed for Errors.
Declaration
public bool AllowDuplicateErrors { set; }
Property Value
Type | Description |
---|---|
bool |
IndicateErrorCode
if set to true, the FluentValidation.Results.ValidationFailure.ErrorCode value of the failure will be serialized to the response.
Declaration
public bool IndicateErrorCode { get; set; }
Property Value
Type | Description |
---|---|
bool |
IndicateErrorSeverity
if set to true, the FluentValidation.Severity value of the failure will be serialized to the response.
Declaration
public bool IndicateErrorSeverity { get; set; }
Property Value
Type | Description |
---|---|
bool |
ResponseBuilder
sets a function used for transforming validation errors to a RFC7807 compatible problem details error response dto.
Declaration
public Func<List<ValidationFailure>, HttpContext, int, object> ResponseBuilder { set; }
Property Value
Type | Description |
---|---|
Func<List<ValidationFailure>, HttpContext, int, object> |
TitleTransformer
sets a function that will be called per instance/response that allows customization of the Title value.
Declaration
public Func<ProblemDetails, string> TitleTransformer { set; }
Property Value
Type | Description |
---|---|
Func<ProblemDetails, string> |
TitleValue
globally sets the value of Title.
Declaration
public string TitleValue { set; }
Property Value
Type | Description |
---|---|
string |
TypeTransformer
sets a function that will be called per instance/response that allows customization of the Type value.
Declaration
public Func<ProblemDetails, string> TypeTransformer { set; }
Property Value
Type | Description |
---|---|
Func<ProblemDetails, string> |
TypeValue
globally sets the value of Type.
Declaration
public string TypeValue { set; }
Property Value
Type | Description |
---|---|
string |