Hi @Gareth Parry When a ForEach
loop fails in Azure Data Factory, you often get a generic message like "Activity failed because an inner activity failed." To capture the actual error details, here’s what you can do:
- Check Inner Activities: Go to the Monitor tab, click on the
ForEach
activity, then expand each failed iteration. You'll be able to see which inner activity failed and why. - Use Expressions to Capture Errors: You can access detailed error info from the activity object. Normally you use:
But to get the error message when something fails, use:@activity('MyActivityName').output
This is especially useful inside error-handling logic, such as a Try-Catch pattern or an If Condition block, where you want to log or route errors.@activity('MyActivityName').error.message
- Optional Logging: Consider appending the error message to a variable or logging it to a table or blob for future analysis.
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.