Skip to content
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

How to fail workflow from the activity? #253

Open
arrowcircle opened this issue Jun 22, 2023 · 3 comments
Open

How to fail workflow from the activity? #253

arrowcircle opened this issue Jun 22, 2023 · 3 comments

Comments

@arrowcircle
Copy link

Hey! I am looking for a way to fail workflow from the activity.
I found termiation example, but this sets workflow status to terminated, not to failed.

Is there are any way to fail workflow from the activity?

@santiagodoldan
Copy link
Contributor

Not sure if you were looking for an API to fail a workflow, I'm not sure if there is one really, but if you raise a custom error and you add it to the non_retriable_errors collection of the retry_policy config, that should work.

@arrowcircle
Copy link
Author

@santiagodoldan Thanks for the suggestions. In this case, it will show workflow as terminated (grey), not failed (red). This breaks visibility in UX a lot.

@cdimitroulas
Copy link

@santiagodoldan Thanks for the suggestions. In this case, it will show workflow as terminated (grey), not failed (red). This breaks visibility in UX a lot.

I don't think this is true. Raising a non-retriable error will fail the activity and the workflow correctly (failed, not terminated). We have been using this successfully in our app.

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

No branches or pull requests

3 participants