-
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
core: smooth rough edges of pageLoadError display and reporting #6083
Conversation
This comment has been minimized.
This comment has been minimized.
I will fight you, devtools-bot |
Love it. No more red text. |
@@ -301,9 +301,7 @@ class Runner { | |||
static getArtifactRuntimeError(artifacts) { | |||
for (const possibleErrorArtifact of Object.values(artifacts)) { | |||
if (possibleErrorArtifact instanceof LHError && possibleErrorArtifact.lhrRuntimeError) { | |||
const errorMessage = possibleErrorArtifact.friendlyMessage ? | |||
`${possibleErrorArtifact.friendlyMessage} (${possibleErrorArtifact.message})` : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this concatenation is now directly handled by gather runner now, right? was that the only case we fell into this path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, in gather runner. And since this was only introduced in #6051, there's nothing depending on it (only lr uses it, and only for human debugging; it's never shown to users).
message
here is the error code, so it seemed redundant to keep it when the code is sitting right next to it on the object. I can add it back if we want to match the other place(s?) we put together an error string out of an lherror
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah, sounds good as-is 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lurve it
} else if (mainRecord.failed) { | ||
errorCode = LHError.errors.FAILED_DOCUMENT_REQUEST; | ||
errorReason = mainRecord.localizedFailDescription; | ||
errorDef = {...LHError.errors.FAILED_DOCUMENT_REQUEST}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why so fancy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why so fancy?
easier than Object.assign()
? Dunno :) Just needed a shallow copy so it's not modifying the original message
fixes #6071
runtimeError
and individual audit errors now take care of warning the user in that case)friendlyMessage
in HTML report's warning box (runWarnings
)bonus: no longer have a big red
GatherRunner:error FAILED_DOCUMENT_REQUEST
error log on the pageLoadError we expect in the offline pass when a page doesn't support offline :) @exterkamp