Skip to content

Commit

Permalink
fix: Capture resources even when Puppeteer tab times out (#510)
Browse files Browse the repository at this point in the history
This splits the try/catches up so we can still capture the discovered
resourses even if the `goto` times out.
  • Loading branch information
Robdel12 authored May 18, 2020
1 parent 06dc067 commit 8a39366
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/services/asset-discovery-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,12 @@ export class AssetDiscoveryService extends PercyClientService {
profile('--> assetDiscoveryService.waitForNetworkIdle')
await waitForNetworkIdle(page, this.configuration['network-idle-timeout'])
profile('--> assetDiscoveryService.waitForNetworkIdle')
} catch (error) {
logger.error(addLogDate(`${error.name} ${error.message}`))
logger.debug(addLogDate(error))
}

try {
profile('--> assetDiscoveryServer.waitForResourceProcessing')
maybeResources = await Promise.all(maybeResourcePromises)
profile('--> assetDiscoveryServer.waitForResourceProcessing')
Expand Down

0 comments on commit 8a39366

Please sign in to comment.