I have created a module and intend to perform web scraping by calling a crawler in that module.
If the specified selector cannot be collected during the scraping process,
I want the crawler to stop and return the encountered error.
I would like to check this error using a try/catch statement.
Is there a solution? Or Can I get some test code about it?
example code
const engine = ()=>{
try{
const crawler = const crawler = new PlaywrightCrawler({});
}catch(err){
//I want to catch here of crawler's error about timeout
}
}