diff --git a/browser.go b/browser.go index 42b6818c..b6eaa23a 100644 --- a/browser.go +++ b/browser.go @@ -112,7 +112,7 @@ func NewBrowser(ctx context.Context, urlstr string, opts ...BrowserOption) (*Bro urlstr = forceIP(urlstr) b.conn, err = DialContext(dialCtx, urlstr, WithConnDebugf(b.dbgf)) if err != nil { - return nil, fmt.Errorf("could not dial %q: %v", urlstr, err) + return nil, fmt.Errorf("could not dial %q: %w", urlstr, err) } go b.run(ctx) diff --git a/chromedp.go b/chromedp.go index 277a68ac..d02b3d52 100644 --- a/chromedp.go +++ b/chromedp.go @@ -386,7 +386,7 @@ func (c *Context) attachTarget(ctx context.Context, targetID target.ID) error { for _, action := range actions { if err := action.Do(cdp.WithExecutor(ctx, c.Target)); err != nil { - return fmt.Errorf("unable to execute %T: %v", action, err) + return fmt.Errorf("unable to execute %T: %w", action, err) } } return nil diff --git a/query.go b/query.go index 01c1c19b..939c1d7e 100644 --- a/query.go +++ b/query.go @@ -934,7 +934,7 @@ func JavascriptAttribute(sel interface{}, name string, res interface{}, opts ... if err := evalInCtx(ctx, execCtx, snippet(attributeJS, cashX(true), sel, nodes[0], name), res, ); err != nil { - return fmt.Errorf("could not retrieve attribute %q: %v", name, err) + return fmt.Errorf("could not retrieve attribute %q: %w", name, err) } return nil }, opts...)