question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IPipelineBehaviour does not run for IRequest

See original GitHub issue

After updating to V12 i have the problem that my pipelines do not run for requests which just implement IRequest.

I had to remove Unit as TResponse from my Handler

Before:

MyHandler: IRequestHandler<MyRequest, Unit>

After the update: MyHandler: IRequestHandler<MyRequest>

After this change the Pipelines are not running. When i change my Request from MyRequest: IRequest to: MyRequest: IRequest<Unit>

the pipelines are running again.

Issue Analytics

  • State:closed
  • Created 7 months ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jbogardcommented, Feb 15, 2023

Well I JUST made the migration guide this morning. Hard to get this all out together!

0reactions
stefannikoleicommented, Feb 15, 2023

Yeah and a dependabot picks it up immediately.

But good job on this release. Removing the necessity for Unit is good in my eyes

Read more comments on GitHub >

github_iconTop Results From Across the Web

IPipelineBehavior not being executed · Issue #879
Prior to 12 everything worked fine but now I can't make pipeline behaviors work. I register them like this: services.AddMediatR(c => { c....
Read more >
MediatR IPipelineBehavior<TRequest, TResponse> errors ...
But After upgrading to Nuget - v10.0.0 I started getting the below compilation error. The type 'TRequest' cannot be used as type parameter...
Read more >
CQRS Validation Pipeline with MediatR and FluentValidation
We are going to learn how to implement validation as a cross-cutting concern using CQRS pattern with MediatR and FluentValidation.
Read more >
MediatR 12.0 Released
Making "void" request handlers return Task instead of Unit; IRequest does not inherit IRequest<Unit> instead IBaseRequest; Consolidating the ...
Read more >
Why I don't use MediatR for CQRS
In MediatR we don't have concepts like Commands and Queries . There's a more generic thing called the Request , represented by IRequest<T>...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found