Skip to content

Commit

Permalink
add some details on when a loadevents and domcontent fails
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinedwv committed Sep 11, 2023
1 parent 2f2c0ca commit 02601d5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/summoner/acquire/headlessNG.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,8 @@ func PageRender(v1 *viper.Viper, timeout time.Duration, url, k string, repologge
return response, err
}

if _, err = loadEventFired.Recv(); err != nil {

if loadEventReply, err := loadEventFired.Recv(); err != nil {
log.Trace(loadEventReply)
log.Errorf(" loadEventFired error original targetID: %s url: %s", targetID, url)
log.Errorf("loadEventFired error context TargetID: %s url: %s", ctx.Value("targetId"), url)
log.WithFields(log.Fields{"url": url, "issue": "Headless Load Event Error"}).Error(err)
Expand All @@ -425,7 +425,8 @@ func PageRender(v1 *viper.Viper, timeout time.Duration, url, k string, repologge
loadEventFired.Close()

// Wait until we have a DOMContentEventFired event.
if _, err = domContent.Recv(); err != nil {
if contentReply, err := domContent.Recv(); err != nil {
log.Trace(contentReply)
log.Errorf(" domContent.Recv error original targetID: %s url: %s", targetID, url)
log.Errorf("domContent.Recv error context TargetID: %s url: %s", ctx.Value("targetId"), url)
log.WithFields(log.Fields{"url": url, "issue": "Dom Error"}).Error(err)
Expand Down

0 comments on commit 02601d5

Please sign in to comment.