Join GitHub today
page.render() callback provides no error information on failure #290
I tried running page.render() to save a page to a .pdf document, and all is fine and good if it succeeds. However, I tried writing to a read-only directory (just to test my error handling), and there was no hint of a failure within the code. The callback passed to render() was called with no arguments, exactly as it would have been called if the file write had been successful. Here's what the code looks like:
Regardless of whether or not the file is created, I always see "File was successfully saved as a PDF" in the console.
For now, I can check to make sure that the file is written after render() finishes, but is there any way to get a "status" argument (like page.open() has) for the page.render() method?
Thanks in advance for your help and great work on this fantastic tool!