From 7129cecdf87434267b099f3b10bdb2d0bcb36720 Mon Sep 17 00:00:00 2001 From: milarin Date: Tue, 7 Mar 2023 18:28:45 +0100 Subject: [PATCH] fixed wrong use of ErrCurlRequestFailed --- novelupdates.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/novelupdates.go b/novelupdates.go index 0546feb..4641094 100644 --- a/novelupdates.go +++ b/novelupdates.go @@ -24,7 +24,7 @@ func (api *Api) GetWithCookie(ctx context.Context, url string) (*goquery.Documen data, err := curl.Output() if err != nil { - return nil, ErrCurlRequestFailed.New(err, url) + return nil, ErrCurlRequestFailed.Wrap(err, url) } r, err := gzip.NewReader(bytes.NewReader(data)) @@ -44,7 +44,7 @@ func (api *Api) Get(ctx context.Context, url string) (*goquery.Document, error) data, err := curl.Output() if err != nil { - return nil, ErrCurlRequestFailed.New(err, url) + return nil, ErrCurlRequestFailed.Wrap(err, url) } r, err := gzip.NewReader(bytes.NewReader(data))