Add better catch if getting the right page in the HAR fails. (#3810)
This commit is contained in:
parent
a84c59b714
commit
1efa38e966
|
|
@ -267,7 +267,20 @@ export default class BrowsertimePlugin extends SitespeedioPlugin {
|
|||
url
|
||||
);
|
||||
}
|
||||
run.har = pickAPage(result.har, harIndex);
|
||||
try {
|
||||
run.har = pickAPage(result.har, harIndex);
|
||||
} catch (harError) {
|
||||
log.error('Couldnt get the right page for the HAR', harError);
|
||||
super.sendMessage(
|
||||
'error',
|
||||
'Could not get the right page for the HAR, the page is missing',
|
||||
{
|
||||
url,
|
||||
runIndex,
|
||||
iteration: runIndex + 1
|
||||
}
|
||||
);
|
||||
}
|
||||
} else {
|
||||
// If we do not have a HAR, use browser info from the result
|
||||
if (result.length > 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue