Table of Contents

Class ErrorHandlingMiddlewareOptions

Namespace
WorkflowForge.Options.Middleware
Assembly
WorkflowForge.dll

Configuration options for error handling middleware. Controls exception handling behavior. Zero-dependency POCO for configuration binding.

public sealed class ErrorHandlingMiddlewareOptions : WorkflowForgeOptionsBase, ICloneable
Inheritance
ErrorHandlingMiddlewareOptions
Implements
Inherited Members

Constructors

ErrorHandlingMiddlewareOptions()

Initializes a new instance with default section name.

public ErrorHandlingMiddlewareOptions()

ErrorHandlingMiddlewareOptions(string)

Initializes a new instance with custom section name.

public ErrorHandlingMiddlewareOptions(string sectionName)

Parameters

sectionName string

Custom configuration section name.

Fields

DefaultSectionName

Default configuration section name for binding from appsettings.json. This is the default value; users can specify a custom section name when binding.

public const string DefaultSectionName = "WorkflowForge:Middleware:ErrorHandling"

Field Value

string

Properties

IncludeStackTraces

Gets or sets whether to include full stack traces in error logs. When true, complete stack traces are logged (helpful for debugging). When false, only exception messages are logged (cleaner logs). Default is true.

public bool IncludeStackTraces { get; set; }

Property Value

bool

RethrowExceptions

Gets or sets whether to rethrow exceptions after handling. When true, exceptions are logged and re-thrown (recommended). When false, exceptions are swallowed and a default value is returned. Default is true.

public bool RethrowExceptions { get; set; }

Property Value

bool

Methods

Clone()

Creates a deep copy of this options instance.

public override object Clone()

Returns

object

A new instance with the same configuration values.

Validate()

Validates the options configuration and returns a list of validation errors.

public override IList<string> Validate()

Returns

IList<string>

A list of validation error messages. Empty list indicates valid configuration.