-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
feature-request: add reason to runtime error output #5838
Comments
This comment has been minimized.
This comment has been minimized.
@samfoot yeah this sounds great. Happy for you to take this. |
@patrickhulce do you remember why we moved the @samfoot At the very least |
Oh yeah that was mostly for Sentry coalescing on the error message. In most of the cases we did this I think it was a win to not give so much debugging info to users who are confused, but in this case I agree it is a bit of a loss. I think it'd make sense to show the real reason here too 👍 Maybe we could do a transform of errors before sending them into the LHR? i.e. if the error has a |
Feature request summary
When a
FAILED_DOCUMENT_REQUEST
error occurs the error message does not give the actual reason for this as it's not part of the stack trace for example:Runtime error encountered: Your page failed to load. Verify that the URL is valid and re-run Lighthouse. LHError: FAILED_DOCUMENT_REQUEST at Function.getPageLoadError (/lighthouse/lighthouse-core/gather/gather-runner.js:168:21) at Function.afterPass (/lighthouse/lighthouse-core/gather/gather-runner.js:273:38) at process._tickCallback (internal/process/next_tick.js:68:7)
I am proposing to add the actual reason be displayed (if available) from the error, for example:
Runtime error encountered: Your page failed to load. Verify that the URL is valid and re-run Lighthouse. Reason: net::ERR_CERT_COMMON_NAME_INVALID LHError: FAILED_DOCUMENT_REQUEST at Function.getPageLoadError (/lighthouse/lighthouse-core/gather/gather-runner.js:168:21) at Function.afterPass (/lighthouse/lighthouse-core/gather/gather-runner.js:273:38) at process._tickCallback (internal/process/next_tick.js:68:7)
I am willing to do the work to add this.
What is the motivation or use case for changing this?
Being able to determine what the actual error that caused the page to fail to load would better help me explain to my users why the audit failed.
How is this beneficial to Ligthhouse?
Better diagnostics for developers that use the CLI to programatically audit.
The text was updated successfully, but these errors were encountered: