fixed wrong use of ErrCurlRequestFailed
This commit is contained in:
parent
bbb28298f8
commit
7129cecdf8
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user