-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 commentThe 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).
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nah, sounds good as-is 👍 |
||
possibleErrorArtifact.message; | ||
const errorMessage = possibleErrorArtifact.friendlyMessage || possibleErrorArtifact.message; | ||
|
||
return { | ||
code: possibleErrorArtifact.code, | ||
|
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.
easier than
Object.assign()
? Dunno :) Just needed a shallow copy so it's not modifying the original message