fixed wrong use of ErrCurlRequestFailed

This commit is contained in:
milarin 2023-03-07 18:28:45 +01:00
parent bbb28298f8
commit 7129cecdf8

View File

@ -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))