I have some Flows that update a work item in Azure Devops by adding a comment. I am using the Send HTTP Request to Azure Devops action with this request https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/comments/add?view=azure-devops-rest-5.1
Occasionally it fails with error "TF26071: This work item has been changed by someone else since you opened it. You will need to refresh it and discard your changes."
Is there any way I can prevent or handle this error?
Your previous steps on the same work item might still be in process as the HTTP request is sent? Try using the Delay step and have your flow pause for a couple of seconds.
There are no preceeding steps that make any update to the work item. I suspect it is some kind of conflict with a change that is being made to the work item by another user in the Azure DevOps GUI. As far as I am aware, concurrent changes to the item are merged on each save unless the changes are to the same field which might result in a conflict. But if I run my Flow which adds a comment while I also have it open in the GUI adding a comment I don't get this error. The error is only happening once in every hundred or so runs.
This update is the last action in the Flow so I am thinking one option might be to add a subsequent on-fail action to retry the same update
As I was reading your response, I thought of suggesting a retry on error. And then I got to your last line!
I think you should try it! like a "configure run after" thing on a condition, right?
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!