cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

How to handle a Server Error (500) from calling web API via Flow (triggered from PowerApps)

Below is a Flow I have written which is triggered from PowerApps, and queries a web API to get some data back into PowerApps. If the value its looking for doesn't exist, a server error (500) is returned after a few retries. This flows back into PowerApps as an error, but it slows the app right down as it tries for the maximum of something like 90 seconds before timing out.  Is there a way within Flow, that I can handle the 500 error, and instead return a default value back to PowerApps? (like a '0' or something?) 

 

2018-10-29 13_17_12-Run History _ Microsoft Flow.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: How to handle a Server Error (500) from calling web API via Flow (triggered from PowerApps)

Hi @JamesM,

Could you please share a bit more about your scenario?

Do you want to handle the 500 error within your flow, and return a default value to PowerApps instead of failure info?

If you want to handle the 500 error within your flow, and return a default value to PowerApps instead of failure info, I think the "Configure run after" option and Parallel branch action could achieve your needs.

I have made a test on my side, please take a try with the following workaround:

  • Under the "HTTP" action, you should add a Parallel branch action.
  • Within the right branch of the Parallel branch action, add a same "Respond to PowerApps" action (Respond to PowerApps 2).
  • Click "Menu" option of "Respond to PowerApps 2" action, select "Configure run after" option. Within the displayed panel, select "has failed" option and "has timed out" option.5.JPG

     

The whole screenshot as below:6.JPG

More details about adding a Parallel branch action within a flow, please check the following GIF screenshot:Test1.gif

Please also check the following blog for more details:

https://flow.microsoft.com/en-us/blog/parallel-actions/

More details about using the "Configure run after" option within Microsoft Flow, please check the following blog:

https://flow.microsoft.com/en-us/blog/error-handling/

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: How to handle a Server Error (500) from calling web API via Flow (triggered from PowerApps)

Hi @JamesM,

Could you please share a bit more about your scenario?

Do you want to handle the 500 error within your flow, and return a default value to PowerApps instead of failure info?

If you want to handle the 500 error within your flow, and return a default value to PowerApps instead of failure info, I think the "Configure run after" option and Parallel branch action could achieve your needs.

I have made a test on my side, please take a try with the following workaround:

  • Under the "HTTP" action, you should add a Parallel branch action.
  • Within the right branch of the Parallel branch action, add a same "Respond to PowerApps" action (Respond to PowerApps 2).
  • Click "Menu" option of "Respond to PowerApps 2" action, select "Configure run after" option. Within the displayed panel, select "has failed" option and "has timed out" option.5.JPG

     

The whole screenshot as below:6.JPG

More details about adding a Parallel branch action within a flow, please check the following GIF screenshot:Test1.gif

Please also check the following blog for more details:

https://flow.microsoft.com/en-us/blog/parallel-actions/

More details about using the "Configure run after" option within Microsoft Flow, please check the following blog:

https://flow.microsoft.com/en-us/blog/error-handling/

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,301)