Namespace Caesar.Pipeline
Classes
- RequestExceptionActionProcessorBehavior<TRequest, TResponse>
Runs every matching IRequestExceptionAction<TRequest, TException> when the inner pipeline throws, most specific exception type first, then rethrows the original exception.
- RequestExceptionHandlerState<TResponse>
Tracks whether an exception was handled and which response to return in its place.
- RequestExceptionProcessorBehavior<TRequest, TResponse>
Catches exceptions from the inner pipeline and dispatches them to the matching IRequestExceptionHandler<TRequest, TResponse, TException> instances, most specific exception type first. If a handler marks the exception as handled, its response is returned; otherwise the exception is rethrown with its original stack trace.
- RequestPostProcessorBehavior<TRequest, TResponse>
Runs every registered IRequestPostProcessor<TRequest, TResponse> after the handler. Registered automatically by
AddCaesarwhen at least one post-processor exists.
- RequestPreProcessorBehavior<TRequest, TResponse>
Runs every registered IRequestPreProcessor<TRequest> before the handler. Registered automatically by
AddCaesarwhen at least one pre-processor exists.
Interfaces
- IRequestExceptionAction<TRequest>
Shorthand for acting on every Exception for a request.
- IRequestExceptionAction<TRequest, TException>
Runs side effects (logging, metrics, compensation) when an exception of type
TException(or a derived type) is thrown while handlingTRequest. The exception is always rethrown afterwards.
- IRequestExceptionHandler<TRequest, TResponse>
Shorthand for handling every Exception for a request.
- IRequestExceptionHandler<TRequest, TResponse, TException>
Handles an exception of type
TException(or a derived type) thrown while handlingTRequest. Call SetHandled(TResponse) to swallow the exception and supply a fallback response; otherwise the exception is rethrown.
- IRequestPostProcessor<TRequest, TResponse>
Runs after the handler of
TRequesthas produced a response.
- IRequestPreProcessor<TRequest>
Runs before the handler of
TRequest. Cannot alter the response or short-circuit; use an IPipelineBehavior<TRequest, TResponse> for that.