Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add top level warning if page returned an error status code #4082

Closed
paulirish opened this issue Dec 18, 2017 · 1 comment · Fixed by #6051
Closed

Add top level warning if page returned an error status code #4082

paulirish opened this issue Dec 18, 2017 · 1 comment · Fixed by #6051
Assignees
Labels

Comments

@paulirish
Copy link
Member

We have some checks in gather-runner to assert we have a network request for the document and it didn't completely fail:

pageLoadError = GatherRunner.getPageLoadError(options.url, networkRecords);
// If the driver was offline, a page load error is expected, so do not save it.
if (!driver.online) pageLoadError = null;
if (pageLoadError) {
gathererResults.LighthouseRunWarnings.push('Lighthouse was unable to reliably load the ' +
'page you requested. Make sure you are testing the correct URL and that the server is ' +
'properly responding to all requests.');
}

completely fail = Network.loadingFailed protocol event.

However 400+ and 500+ status codes will not be caught by this, but are probably an issue. We should add a top level warning in this case.

mainRecord.hasErrorStatusCode() just checks if the mainRecord.statusCode is >= 400. We might as well use this and add the mainRecord.statusCode into a toplevelwarning, so the user knows this pageload is not your typical one.

@paulirish paulirish added the P1 label Dec 18, 2017
@paulirish
Copy link
Member Author

dependency of #5881

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants