Skip to content

Commit

Permalink
Add logs to ba able to fix the untimely errors on examples check
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Jul 13, 2019
1 parent 8962774 commit cfc03ad
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion buildtools/check-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ function loaded(page, browser) {
url.startsWith('https://geomapfish-demo-2-5.camptocamp.com/') ||
url.startsWith('https://wms.geo.admin.ch/')) {
console.log(`Request failed on: ${url}`);
for (const n in request.response().headers()) {
console.log(`${n}: ${request.response().headers()[n]}`);
}
process.exit(2);
}
loaded(page, browser);
Expand All @@ -123,7 +126,9 @@ function loaded(page, browser) {
console.log(`Console ${type}`);
console.log(`On: ${location.url} ${location.lineNumber}:${location.columnNumber}.`);
console.log(message.text());
process.exit(2);
if (!message.text().includes('CORS')) {
process.exit(2);
}
}
});
await page.goto(url).catch(error => {
Expand Down

0 comments on commit cfc03ad

Please sign in to comment.