ExceptionHandlerOptions.StatusCodeSelector Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient ou définit un délégué utilisé pour mapper une exception à un code d’état HTTP.
public Func<Exception,int>? StatusCodeSelector { get; set; }
member this.StatusCodeSelector : Func<Exception, int> with get, set
Public Property StatusCodeSelector As Func(Of Exception, Integer)
Valeur de propriété
Remarques
Si StatusCodeSelector c’est nullle cas, le code d’état d’exception par défaut est 500. Si l’exception est une BadHttpRequestExceptionexception, elle StatusCode est utilisée à la place.