Skip to content

Commit

Permalink
Add waitForNavigation error to span
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur22 committed Apr 22, 2024
1 parent 355e1b5 commit ecb98a9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion common/page.go
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,13 @@ func (p *Page) WaitForNavigation(opts *FrameWaitForNavigationOptions) (*Response
_, span := TraceAPICall(p.ctx, p.targetID.String(), "page.waitForNavigation")
defer span.End()

return p.frameManager.MainFrame().WaitForNavigation(opts)
resp, err := p.frameManager.MainFrame().WaitForNavigation(opts)
if err != nil {
SpanRecordError(span, "waiting for navigation failed", err)
return nil, err
}

return resp, err
}

// WaitForRequest is not implemented.
Expand Down

0 comments on commit ecb98a9

Please sign in to comment.