-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Description
The example code in https://github.com/jbogard/MediatR/wiki#exception-handler-pipeline-step
public class RequestExceptionProcessorBehavior<TRequest, TResponse, TException> : IRequestExceptionHandler<TRequest, TResponse, TException>
where TRequest : notnull where TException : Exception
{
public Task Handle(TRequest request, TException exception, RequestExceptionHandlerState<TResponse> state, CancellationToken cancellationToken)
{
throw new NotImplementedException();
}
}will throw an exception on startup:
System.ArgumentException: Error registering the generic handler type: PMCM.BlazorApp.Core.Pipeline.RequestExceptionProcessorBehavior`3. When registering generic requests with more than two type parameters, each type parameter must have at least one constraint of type interface or class.
azhe403, leonkelder, zachpainter77 and comment-it-out