When you view an ordinary web page, many errors may occur without your knowledge. The page itself may fail to load, or resources (such as images and stylesheets) may fail to download, be sent using bad encoding, have unknown MIME types, or any number of other common errors.
As long as the page loads, your browser attempts to display the page and it ignores any errored images or stylesheets. You can see these errors will appear in the browser’s development console.
By default, DocRaptor’s HTML to PDF service works the same way. We’ll ignore resource errors and only actually fail your document if the web page itself rails. Any resource errors encountered will be logged, but you’ll never know the error occured without checking the document log.
doc[ignore_resources_error] API parameter to
Obviously, if your document fails, you’ll want to make sure this error alerts your development team through error logging or application monitoring.
We’ll fail the document if we encounter any of the following errors:
- Connection Timeouts
- DNS Resolution errors
- Unknown MIME types
- SSL Issues
- Rejected Connections