I have one For-Each Activity, which iterates 4 times. Out of those 4 runs, one of the run failed, but still the pipeline is shown as succeeded ?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Do you have an 'on-failure' condition coming from the foreach? Was the foreach activity shown as a failure?
@djpmsft

Inside For each I have 2 activities:


@chez-charlie can confirm, but because you have the web activity within the foreach on a failure condition, the iteration will likely show as 'success'.
Here is a blog Charlie wrote about error handling in ADF: https://techcommunity.microsoft.com/t5/azure-data-factory/understanding-pipeline-failures-and-error-handling/ba-p/1630459
Thanks @djpmsft . It worked. But its confusing for the end user and also now we need to put a activity in place which is actually not required. Just my 2 cents :) thanks.
Thanks much @djpmsft for sharing the article.
Hi @vikramdadwal , As called out in the blog, your ForEach implementation falls under TRY-CATCH block.
TRY-CATCH block:

If you expecting your pipeline to fail when any of the iteration fails, then you can chain a success path to your Entity-Copy activity with a 'Wait activity' of 1second or a dummy set variable activity as shown below. In that case when there is a failure in your Entity-Copy the activity flow follows to failure path and trigger EntityCopy-Error-Telemetry with pipeline final status as Failed.

Hope this clarifies.
Please note that Azure Doc feedback channel is for driving improvements towards MS Docs and we didn't determine any changes for this documentation upon reviewing this feedback.
If you have further queries regarding this issue, we request you to please reach out in other forums like Microsoft Q&A. We have our engineers and other community members who will be happy to assist.
If you have a document which you are following and if you think it needs an update, please let us know about that here.
Thank you.
@vikramdadwal : Thanks for your inputs/feedback. I would request you to please share your thoughts/feedback in ADF user voice channel: https://feedback.azure.com/forums/270578-data-factory.
All the feedback shared in this forum are actively monitored and reviewed by ADF engineering team. Please do share the link once it is created, so that other users can up-vote and comment on your idea/suggesiton.
Also you could share the feedback directly from ADF UI as shown below.

Thank you.
We will now proceed to close this thread. Please feel free to comment if you have further queries. :)
@vikramdadwal I agree, just the messenger here :)
Most helpful comment
Thanks @djpmsft . It worked. But its confusing for the end user and also now we need to put a activity in place which is actually not required. Just my 2 cents :) thanks.