Table of Contents

HttpExceptionDescriptor Constructor

Definition

HttpExceptionDescriptor(Exception, int, string, string, Uri)

Initializes a new instance of the HttpExceptionDescriptor class.

public HttpExceptionDescriptor(Exception failure, int statusCode = 500, string code = null, string message = null, Uri helpLink = null)

Parameters

failure Exception

The Exception that caused the current failure.

statusCode int

The status code of the HTTP request.

code string

The error code that uniquely identifies the type of failure.

message string

The message that explains the reason for the failure.

helpLink Uri

The optional link to a help page associated with this failure.

Remarks

The following table shows the initial property values for an instance of HttpExceptionDescriptor.

ParameterInitial Value
statusCodeStatusCodes.Status500InternalServerError
codecode ?? ReasonPhrases.GetReasonPhrase(statusCode)
messagemessage ?? failure.Message