Throw Error Activity
If my pipeline orchestrates an asynchronous operation like processing an Azure Analysis Services model that the pattern is to start the operation asynchronously then loop and check the status. If the status is failed the REST API just says status=Failed but the REST API does not return an HTTP 500 status code so ADF does not fail. So I need a new Throw Error Activity component that will let me build an expression for the ErrorMessage property and throw an error message. Better yet there would be a property which does not throw an error if the property is set to false but does throw an error if the property is set to true.
Tristan Griffith commented
It's over 2 years since this was originally posted. We really need this feature as there are scenarios where an unconditional clean-up activity is needed but we also need to be alerted to failures.
If you have a clean-up activity triggered by the completion of some other activity, any failures in the activity triggering the clean-up activity get masked and the overall pipeline will say that it "Succeeded".
The current workaround is to connect a "Web" activity that queries a known unreachable endpoint to force the overall pipeline to fail. It would be great if instead we had proper support to explicitly throw an error (or an option on an activity to fail the overall pipeline on failure).
There needs to be some kind off stop execution command as part of ADF. Sequential 4 eaches continue to run even with a failure. We had to code and create an exception to make it stop. This is not ideal and no fun to support a year later with new resources.
demolition porg commented
Please add this to data factory, there are a number of scenario's where this would be useful.
Konstantinos Michas commented
Although I don't have high hopes since this feedback raised back in 2018 and already in mid 2020, it seems to me that nobody cares to step up in MS Azure Dev team. I gave it a try anyway and created this one today
Sven Gfeller commented
For the time beeing, I am doing it like this where "Fail" is a boolean variable.
Nick McDermaid commented
Great minds think alike - I am doing exactly the same thing. I think I'll do a database call with RAISERROR. Nasty but I'm already working around the fact that you can't capture refreshId directly from the initial REST call. If we got raiserror capability in ADF and conditional workflow it would make all of my pipelines waaaay simpler.
Gaurav Gangwar commented
Please add some error handling feature in DF only.
Because most of the time it's not allowed to use Logic App.
how to do the error handling of the pipelines in azure datafactory
Definitely need the error component to show the red pill ... my if condition fails but the activity success connector turns true and the next dependent activity gets executed .. completely agree with Mark said about how that activity should work .. just raise an error and show a red pill to notify .. Thanks
These are basic features that is required when performing ELT operations. You need to add this feature on priority.
I need this too for an IF activity. I get how a specific activity could do this but your "better still" comment, not sure how this would be implemented because there are 4 possible scenarios.
The activity generated and error and do we throw or not throw.
The activity generated no error and do we throw or not throw..
My 2c would say have an activity whose only job is to create an error output (the red pill :-) ). This can be placed anywhere but especially useful in an IF activity on either the true or false branch.
It would be good to have an activity that forces the pipeline to fail with a customized error message that could be used, for example, within an If Condition activity and thus would trigger an alert that we have configured for when the pipeline fails. This way we can receive a notification email with the message cause pipeline fails.
Lalit Rana commented
There are situations while orchestrating control flow to fail the parent or entire pipeline based on certain error. Either ADF should add this behavior to each activity like SSIS or add another ErrorHandling activity which can fail the parent or pipeline itself.
e.g In ForEach activity there is no way to terminate loop on failure of one iteration.