HttpExceptionDescriptor Constructor
Definition
- Namespace
- Cuemon.AspNetCore.Diagnostics
- Assemblies
- Cuemon.AspNetCore.dll
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 |