---
title: SAIF.NetCore.ErrorHandler operations and processes
summary: Catalog of operations and processes implemented by this library.
status: draft
owner: Framework.NCore maintainers
last_reviewed: 2026-10-02
library: SAIF.NetCore.ErrorHandler
reference_type: package
---

# SAIF.NetCore.ErrorHandler operations and processes

This page catalogs every operation this library performs and links to a detail page for each.

## Operations catalog

| ID | Operation | Owner | Trigger |
| --- | --- | --- | --- |
| OP-01 | [Log an exception and write the HTTP error response](operations/log-and-return-exception.md) | `ErrorHandler.LogAndReturnException` | `DynamicErrorHandler` (current hosts) or OP-02 (legacy hosts) after catching an exception |
| OP-02 | [Legacy conventional middleware](operations/legacy-invoke-middleware.md) | `ErrorHandler.Invoke` (`[Obsolete]`) | `app.UseMiddleware<ErrorHandler>()` in pre-v1.2.X hosts |
| OP-03 | [Handle a Windows Service error](operations/handle-windows-service-error.md) | `WindowsServiceErrorHandler.HandleError` | `ServiceWorker.HandleTaskError` after a task throws, or direct consumer call |
| OP-04 | [Execute a special error action](operations/execute-special-error-action.md) | `SpecialErrorAction.Invoke` / `SpecialErrorAction<T>.Invoke` | OP-03 step 4 |
| OP-05 | [Format a Windows Service error](operations/format-windows-service-error.md) | `WindowsServiceError.ID` / `GetFormattedErrorString` | OP-03 step 3, and read by special actions through `IErrorContextContainer.ErrorContent` |
| OP-06 | [Exception utilities](operations/exception-utilities.md) | `ExceptionExtensions` | OP-03 steps 1 and 2 |
| OP-07 | [Pass error context to actions](operations/pass-error-context-to-actions.md) | `ContextContainer` | `BeginErrorHandling` subscribers (OP-03 step 2) and special actions (OP-04 step 3) |

## Process flow

```mermaid
flowchart TD
    A["HTTP host: DynamicErrorHandler catches exception"] -->|OP-01| B[ErrorHandler.LogAndReturnException]
    A2["Legacy HTTP host: ErrorHandler.Invoke"] -->|OP-02| B
    C["Windows Service: ServiceWorker.HandleTaskError"] -->|OP-03| D[WindowsServiceErrorHandler.HandleError]
    D -->|OP-05| E[WindowsServiceError formatting]
    D -->|OP-06| F[ExceptionExtensions stack trace / log details]
    D -->|OP-04| G[SpecialErrorAction.Invoke]
    D -->|OP-07| H[ContextContainer]
    G -->|reads| H
```

## Related documentation
- [Index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Dependencies](dependencies.md)
- [Business rules](business-rules.md)
- [API reference](api/index.md)

## Sources
- `src/SAIF.NetCore.ErrorHandler/SAIF.NetCore.ErrorHandler/SAIF.NetCore.ErrorHandler/ErrorHandler.cs`
- `src/SAIF.NetCore.ErrorHandler/SAIF.NetCore.ErrorHandler/SAIF.NetCore.ErrorHandler/ExceptionExtensions.cs`
- `src/SAIF.NetCore.ErrorHandler/SAIF.NetCore.ErrorHandler/SAIF.NetCore.ErrorHandler/WindowsService/WindowsServiceErrorHandler.cs`
- `src/SAIF.NetCore.ErrorHandler/SAIF.NetCore.ErrorHandler/SAIF.NetCore.ErrorHandler/WindowsService/SpecialErrorAction.cs`
- `src/SAIF.NetCore.ErrorHandler/SAIF.NetCore.ErrorHandler/SAIF.NetCore.ErrorHandler/WindowsService/WindowsServiceError.cs`
- `src/SAIF.NetCore.ErrorHandler/SAIF.NetCore.ErrorHandler/SAIF.NetCore.ErrorHandler/WindowsService/ContextContainer.cs`
