Wrap your call in an IF, assign a variable for the return status code initialised to 0 (or whatever) and a second variable that identifies first row (set to True/1 whatever). Have if condition as Status Code != 500 or Row > 1. Overwrite the status code variable with return from call, increment (or whatever) the first row variable
Break foreach loop activity based on output of webhook activity in Azure data factory
I am passing some records through foreach loop activity to webhook activity in ADF
In Webhook activity I am calling Rest API to get the status code back so I get different status codes like 202, 400, 500 for each record. We usually receive 500 code when the API service is down
If I,m passing 5 records to foreach loop, the first request will be sent to Webhook and we get status code 500, loop has to break when we recieve status code 500 for the first record which means rest of the 4 records should not be passed to webhook activity. Can anyone please guide me how to achieve this?
Many thanks for your help in advance