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, 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
failureExceptionThe Exception that caused the current failure.
statusCodeintThe status code of the HTTP request.
codestringThe error code that uniquely identifies the type of failure.
messagestringThe message that explains the reason for the failure.
helpLinkUriThe optional link to a help page associated with this failure.
Remarks
The following table shows the initial property values for an instance of HttpExceptionDescriptor.
| Parameter | Initial Value |
|---|---|
statusCode | StatusCodes.Status500InternalServerError |
code | code ?? ReasonPhrases.GetReasonPhrase(statusCode) |
message | message ?? 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
- int
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.