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
If a local step throws an exception the saga is rolled back.
Application code, e.g. onSagaRolledBack() does not have access to the exception and so cannot doesn't know the reason.
Also, the rollback occurs for any exception, not just 'business-related' exceptions. Consequently, a transient technical failure will result in a rollback
onException() is the equivalent of a try-catch that updates the saga data with the reason for the error. Note: an exception can't be simply stored in the saga data because of the requirement to (de)serialize to/from JSON
onExceptionRollback()
specifies those exceptions that should cause a rollback.
other exceptions are assumed to indicate a transient technical failure and are rethrown by the saga logic - saga creation or reply handling will fail
if onExceptionRollback() is not used, then all exceptions cause a rollback (original behavior)
The text was updated successfully, but these errors were encountered:
cer
added a commit
that referenced
this issue
Sep 7, 2022
If a local step throws an exception, the first (sorted by Ordered) applicable - to exception and saga data - is invoked to update the SagaData prior to starting compensation.
Current behavior
If a local step throws an exception the saga is rolled back.
Application code, e.g.
onSagaRolledBack()
does not have access to the exception and so cannot doesn't know the reason.Also, the rollback occurs for any exception, not just 'business-related' exceptions. Consequently, a transient technical failure will result in a rollback
Proposal
onException()
is the equivalent of a try-catch that updates the saga data with the reason for the error. Note: an exception can't be simply stored in the saga data because of the requirement to (de)serialize to/from JSONonExceptionRollback()
onExceptionRollback()
is not used, then all exceptions cause a rollback (original behavior)The text was updated successfully, but these errors were encountered: