Interface IRequestExceptionAction<TRequest, TException>
Runs side effects (logging, metrics, compensation) when an exception of type TException
(or a derived type) is thrown while handling TRequest. The exception is always rethrown afterwards.
public interface IRequestExceptionAction<in TRequest, in TException> where TRequest : notnull where TException : Exception
Type Parameters
TRequestThe request type.
TExceptionThe exception type.
Methods
Execute(TRequest, TException, CancellationToken)
Executes the action.
Task Execute(TRequest request, TException exception, CancellationToken cancellationToken)
Parameters
requestTRequestThe request that failed.
exceptionTExceptionThe exception.
cancellationTokenCancellationTokenCancellation token.