Closed fredden closed 2 years ago
@krzksz yes, that looks like a good approach. I will open a separate pull request to add error detection via Puppeteer.
Part of the reasoning for doing this separately was to get a good error message out. The testing I've done today shows that we already get good-enough error messages from Puppeteer when there are common connection issues (like DNS failure / domain not found, or TCP connection refused). Adding detection of non-200 response codes should complete the picture.
The other bonus about doing this early was that we get faster feedback for users. Requesting the page allows Magento to load its caches before the Puppeteer time-outs start, and we can test all the URLs at the start in parallel before trying to collect modules from these in sequence.
It also looks like Puppeteer is ignoring certificate issues, so the example given in the pull request description isn't helpful.
Fixes #71
Before:
After: