You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am new to EventFlow, and I find this project really amazing. I have run into an issue that I do not know how to resolve. I did my best looking around - so if there's a documentation on this, or if it has been answered before, appreciate if you can point me to the right direction.
What is the best way to handle DomainError thrown by aggregate as a result of handling a command published from a Saga? My intention is to capture the DomainError and rollback whatever steps the Saga has done before.
To provide additional context to this question:
My application publishes SendMoney from account A to account B
Account A validates command and emits MoneySentEvent
Account A state processes MoneySentEvent and deduct local balance
MoneySentEvent starts a new Saga, which publish ReceiveMoneyCommand to account B
Account B validates the ReceiveMoneyCommand command, and reject with domain error for whatever reason (account suspended, account does not exist)
[My intention] Capture the domain error, and publish additional event to reverse the original amount to account A
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I am new to EventFlow, and I find this project really amazing. I have run into an issue that I do not know how to resolve. I did my best looking around - so if there's a documentation on this, or if it has been answered before, appreciate if you can point me to the right direction.
What is the best way to handle DomainError thrown by aggregate as a result of handling a command published from a Saga? My intention is to capture the DomainError and rollback whatever steps the Saga has done before.
To provide additional context to this question:
Beta Was this translation helpful? Give feedback.
All reactions