(Nodejs) I am writing a web scraper that is running through some pages, takes screenshots etc. But sometimes the program takes way too long or even gets stuck sometimes, low internet speed, connection breaks, library bugs... I need to handle these cases where a specific function took more than lets say 30 seconds. My function is something like this:
const simpleFlow = async () => {
await process1();
await process2();
await process3();
}