I am unable to change the behavior of the final pipeline error message, but I do have two options for you.
- Since you are making API calls, I can assume you are capable of implementing custom logic. In the current call you are using, the error message that an error does occur. You can then make a call to the queryActivityRuns as was discussed in the other thread I helped you with today. The Activity runs will get ALL the activities, including the inner ones. Then filter them by "status".
----------
- Another options is to take advantage of the way success / failure is determined. It is possible to engineer an activity to fail. It is also possible to capture error messages for later use in the pipeline. On the inner loop activities (and wherever else you think it is likely to fail) connect an Append Variable activity via the failure dependency.
If you have a loop, you should use an array type variable and the append variable activity, so if more than one activity fails, you can capture all of them.
Then at the end of the pipeline, place a Set Variable activity. This one we will engineer to fail if our array contains any error messages, and succeed if it is empty. Because of the way we engineer to fail, the input (the array contents) will be displayed in the final error message. This final Set Variable activity should use a boolean or integer to cause a type error.
It is important that the finall Set Variable activity, should it follow a container type activity, be connected by on-completion or on-success dependency. This is because with the way we captured the inner errors, the container activity may no longer report itself as failed. Please let me know if you would like to know the reasoning behind this.
For the final Set Variable activity, I used the following expression:
@if(empty(variables('errors')),true,variables('errors'))
Please let me know if this helps, or I missed anything.
Thank you for your patience and curiosity
Martin