
Announcements
Hi, I am using HTTP GET to pick up data from an API source within a loop. Occasionaly, I get a 301 error but the page you get redirected to is correct and holds the info I need. Is there anyway to ignore the 301 error and simply continue (not ignoring the page)?
-------------------
Thanks.
Pete.
Hi @Anonymous,
A workaround could be to configure a second http action to run after the first HTTP action if it fails. You can use the location field from the output to post another HTTP request to the new location.
That approach is described in this blog post: https://erikyadams.wordpress.com/2019/07/19/microsoft-flow-http-action-and-302/
1. Add another http action (HTTP - 301) and add the following expression to the URI field:
actions('HTTP').outputs.headers.Location
2. Configure the new action to run after the HTTP action if it has failed.
Btw, you could also use a condition to actually check for the 301 status first.