From ecb98a900dc818bd41b2a69b46beee911842c192 Mon Sep 17 00:00:00 2001 From: ankur22 Date: Fri, 5 Apr 2024 15:15:59 +0100 Subject: [PATCH] Add waitForNavigation error to span --- common/page.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/page.go b/common/page.go index 94b8b0c30..3e0630d53 100644 --- a/common/page.go +++ b/common/page.go @@ -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.