title: How to handle page crashed exception in node.js puppeteer?
body: <p>Occasionally, when I run my puppeteer script, I’ll get a “page crashed” error. It’s most likely not a software error, but something to do with the proxy IPs I’m using/webpages I’m scraping. So all I’m really looking to do is just catch the error, close the current page, and open up a new page.</p>
  
  <p>However, my try catch block doesn’t seem to be working. My code is structured like this:</p>
  
  <pre><code>try {
     //puppeteer code
  }
  catch(e) {
     console.log(‘caught error ‘ + e);
  }
  </code></pre>
  
  <p>But when the page crashed error happens, I see “unhandled promise rejection error” instead of my console.log message. What’s going on here?</p>