Share via


ExceptionHandlerOptions.StatusCodeSelector Property

Definition

Gets or sets a delegate used to map an exception to a http status code.

public Func<Exception,int>? StatusCodeSelector { get; set; }
member this.StatusCodeSelector : Func<Exception, int> with get, set
Public Property StatusCodeSelector As Func(Of Exception, Integer)

Property Value

Remarks

If StatusCodeSelector is null, the default exception status code 500 is used.

Applies to