Table of Contents

Class HttpExceptionDescriptor

Namespace
Cuemon.AspNetCore.Diagnostics
Assembly
Cuemon.AspNetCore.dll

Provides information about an Exception, in a developer friendly way, optimized for open- and otherwise public application programming interfaces (API). Implements the ExceptionDescriptor

public class HttpExceptionDescriptor : ExceptionDescriptor
Inheritance
HttpExceptionDescriptor
Inherited Members

Constructors

HttpExceptionDescriptor(Exception, Int32, 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 Int32

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

Properties

CorrelationId

Gets or sets the correlation identifier that allows a reference to a particular transaction or event chain the caller made.

public string CorrelationId { get; set; }

Property Value

String

An identifier that allows a reference to a particular transaction or event chain the caller made.

Instance

Gets or sets the URI that identifies the specific occurrence of the problem.

public Uri Instance { get; set; }

Property Value

Uri

The URI that identifies the specific occurrence of the problem.

RequestId

Gets or sets the request identifier that uniquely identifies the service request the caller made.

public string RequestId { get; set; }

Property Value

String

An identifier that uniquely identifies the service request the caller made.

StatusCode

Gets or sets the HTTP status code of the service request the caller made.

public int StatusCode { get; set; }

Property Value

Int32

The HTTP status code of the service request the caller made.

TraceId

Gets or sets the trace identifier that uniquely identifies the trace of the service request the caller made.

public string TraceId { get; set; }

Property Value

String

A trace identifier that uniquely identifies the trace of the service request the caller made.

See Also