Skip to content

Added information on custom error handlers. #724

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dimademi
Copy link

I have added some information regarding custom error handling.
I found myself digging through the code to understand how to do it, thought it would be useful in the docs.

@dimademi
Copy link
Author

dimademi commented Dec 10, 2020

One thing i wanted to add regarding this topic but couldn't find the way to do so --

How can you override the default exception handling for failed steps?
I see WorkflowDefinition.DefaultErrorBehavior but how can i edit it for FluentApi created workflows?

If any of you could let tell me the way to do it ill add it to the PR.

Cheers.

The WorkflowHost service also has a `.OnStepError` event which can be used to intercept exceptions from workflow steps on a more global level.

## Custom Error Handlers
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really an internal mechanism for handling error types, I suppose you could modify or extend it by registering other handlers in the IoC container, as you can do with any internal workflow-core service... however, I don't think this description really captures that or gives good examples on how to do it. Maybe a better approach would be to write a doc on how to replace internal workflow-core services via IoC registration? We could also add a reference to the new middleware feature on the error handling page?

Copy link
Author

@dimademi dimademi Dec 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea, I can open a new doc page for internal services that will, over time, contain all services documentation.
As for the middleware feature documentation - we can paste the detailed explanation you wrote here into the docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants