Path: redb-route/redb.Route/Abstractions/IErrorHandler.cs
Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route/Abstractions/IErrorHandler.cs
----
namespace redb.Route.Abstractions;
///
/// Last-resort error handler invoked when no local or global exception handler matches.
/// Implement to define application-wide fallback error handling (e.g., dead-letter, alerting).
///
public interface IErrorHandler
{
///
/// Handles an exception that was not caught by any registered exception handler.
///
/// The exchange that caused the exception.
/// The unhandled exception.
/// Cancellation token.
/// A task representing the asynchronous operation.
Task HandleError(IExchange exchange, Exception exception, CancellationToken ct = default);
}