New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Messenger] Add middleware that throws exception if the handler returned data #27839

Closed
Nyholm opened this Issue Jul 4, 2018 · 2 comments

Comments

Projects
None yet
5 participants
@Nyholm
Member

Nyholm commented Jul 4, 2018

To enforce that my command bus handlers do not return any data I would like a middleware that throws an exception.

Sure this could be solved with "Just write your handlers correctly", but I want to be sure that my CQRS rules are enforced.

@ogizanagi ogizanagi changed the title from [Messenger] Add middleware the throws exception if the handler returned data to [Messenger] Add middleware that throws exception if the handler returned data Jul 5, 2018

@kojiDev

This comment has been minimized.

kojiDev commented Jul 9, 2018

Hi I'm trying to migrate my app from services (as a layer where all business logic goes) to CQRS.
But for example if I need to return a jwt token in response to user credentials I shouldn't use CQRS? or just pass the Command directly to Handler?

@Koc

This comment has been minimized.

Contributor

Koc commented Nov 1, 2018

Can this issue closed because #28909 was merged?

@fabpot fabpot closed this Nov 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment