May 06, 2024 03:51 AM
Hello
I've creating a function to act as a rudimentary web scraper to grab some meta data like the page title, description etc using the `fetch()` api.
In an automation, this works perfectly as expected. But in a scripting extension, my `try...catch` throws an error message of "Failed to fetch".
Are there some restrictions/limitations between automation scripts and extension scripts when it comes to using `fetch()` ?
Solved! Go to Solution.
May 06, 2024 04:17 AM
In the extension, try replacing "fetch()" with "remoteFetchAsync()". This method only works in extension scripts whereas "fetch" works in automation scripts.
May 06, 2024 04:17 AM
In the extension, try replacing "fetch()" with "remoteFetchAsync()". This method only works in extension scripts whereas "fetch" works in automation scripts.
May 06, 2024 04:48 AM
Thanks that's fixed it! So simple 🤦