Solved

Error handing in SharePoint 'Get a File' action

  • 15 May 2024
  • 4 replies
  • 39 views

Badge +2

Hi,

I’d like to catch the error if a file is not found when using the SharePoint ‘Get a File’ action. 

On a wider note is there a way to catch an error within any action or group of actions in a similar way in MS Power Automate using the ‘Run After’ setting?

 

https://powerusers.microsoft.com/t5/Webinars-and-Video-Gallery/Power-Automate-Error-Handling-best-practices-Try-Catch-Scope/td-p/1847402

Thanks in advance. 

Darren

icon

Best answer by kate 16 May 2024, 07:48

View original

4 replies

Userlevel 3
Badge +5

Hi @feckinirish,

Teams are currently working on the first phase of Error handling. We will be introducing the ability for instances to go into a paused state when it encounters certain errors, to allow designers to resolve and resume the instance.
Supported errors include: the Connection is invalid, items cannot be found or already exist, “too many requests”. When this feature is released, documentation will include the exhaustive list.

This won’t yet return the error code into the workflow so designers can handle the error in the workflow, but we are exploring subsequent phases to this feature, to allow for customization and automation.

We’re targeting June for this feature - keep an eye on our release notes for the announcement.

Regards,

Kate Huynh

Badge +2

Hi @kate ,

 

Thank for the prompt reply. I look forward to testing this as it would greatly help in my workflows. 

 

Do you have any suggestions on workarounds that i could use in the meantime?

Kind regards,

Darren

Userlevel 3
Badge +5

Hi @feckinirish

Quickest workaround I can think of:

  • Run a “Query” before hand
  • Branch by condition
    • If file exists then “Get”
    • If collection is empty then "Upload file" or send a Task to someone for manual intervention

Hope this helps!

Regards,

Kate Huynh

Userlevel 5
Badge +21

Hi @feckinirish if these replies answered your question, please mark the best one! 

Reply