FaultDescriptorOptions Class
Definition
- Namespace
- Cuemon.AspNetCore.Diagnostics
- Assemblies
- Cuemon.AspNetCore.dll
Specifies options that is related to ExceptionHandlerMiddleware operations.
public class FaultDescriptorOptions : AsyncOptions, IAsyncOptions, IExceptionDescriptorOptions, IValidatableParameterObject, IParameterObject
- Inheritance
-
FaultDescriptorOptions
- Implements
- Derived
- Inherited Members
Examples
The following example demonstrates how to configure fault descriptor options for structured error responses.
using Cuemon.AspNetCore.Diagnostics;
using Cuemon.Diagnostics;
namespace MyApp.Examples;
public class FaultDescriptorOptionsExample
{
public void Demonstrate()
{
var options = new FaultDescriptorOptions
{
SensitivityDetails = FaultSensitivityDetails.FailureWithStackTrace,
RootHelpLink = new System.Uri("https://example.com/errors")
};
}
}
Constructors
| Name | Description |
|---|---|
| FaultDescriptorOptions() | Initializes a new instance of the FaultDescriptorOptions class. |
Properties
| Name | Description |
|---|---|
| ExceptionCallback | Gets or sets the callback delegate that is invoked when an exception has been thrown. |
| ExceptionDescriptorResolver | Gets or sets the function delegate that will resolve a HttpExceptionDescriptor from the specified Exception. |
| FaultDescriptor | Gets or sets the preferred fault descriptor to use when serializing exceptions. Default is FaultDetails, e.g., HttpExceptionDescriptor. |
| HasRootHelpLink | Gets a value indicating whether this instance is initialized with RootHelpLink. |
| HttpFaultResolvers | Gets or sets a collection of HttpFaultResolver that can ease the usage of ExceptionDescriptorResolver. |
| RequestEvidenceProvider | Gets or sets the function delegate that, when SensitivityDetails includes Evidence, provides a default HttpRequestEvidence as part of the serialized result. |
| RootHelpLink | Gets or sets the root link to a help file associated with an API. |
| SensitivityDetails | Gets or sets a bitwise combination of the enumeration values that specify which sensitive details to include in the serialized result. |
| UseBaseException | Gets or sets a value indicating whether to expose only the base exception that caused the faulted operation. |
Methods
| Name | Description |
|---|---|
| ValidateOptions() | Determines whether the public read-write properties of this instance are in a valid state. |