Class HttpExceptionDescriptor
Provides information about an System.Exception, in a developer friendly way, optimized for open- and otherwise public application programming interfaces (API). Implements the ExceptionDescriptor
Inherited Members
Namespace: Cuemon.AspNetCore.Http
Assembly: Cuemon.AspNetCore.dll
Syntax
public class HttpExceptionDescriptor : ExceptionDescriptor
Constructors
| Improve this DocHttpExceptionDescriptor(Exception, Int32, String, String, Uri)
Initializes a new instance of the HttpExceptionDescriptor class.
Declaration
public HttpExceptionDescriptor(Exception failure, int statusCode = 500, string code = null, string message = null, Uri helpLink = null)
Parameters
Type | Name | Description |
---|---|---|
System.Exception | failure | The System.Exception that caused the current failure. |
System.Int32 | statusCode | The status code of the HTTP request. |
System.String | code | The error code that uniquely identifies the type of failure. |
System.String | message | The message that explains the reason for the failure. |
System.Uri | helpLink | 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.
Parameter | Initial Value |
---|---|
statusCode | StatusCodes.Status500InternalServerError |
code | code ?? ReasonPhrases.GetReasonPhrase(statusCode) |
message | message ?? failure.Message |
Properties
| Improve this DocCorrelationId
Gets or sets the correlation identifier that allows a reference to a particular transaction or event chain the caller made.
Declaration
public string CorrelationId { get; set; }
Property Value
Type | Description |
---|---|
System.String | An identifier that allows a reference to a particular transaction or event chain the caller made. |
RequestId
Gets or sets the request identifier that uniquely identifies the service request the caller made.
Declaration
public string RequestId { get; set; }
Property Value
Type | Description |
---|---|
System.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.
Declaration
public int StatusCode { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The HTTP status code of the service request the caller made. |