remove errors.Join (#778)
This commit is contained in:
4
batch.go
4
batch.go
@@ -4,7 +4,6 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
@@ -109,8 +108,6 @@ type BatchResponse struct {
|
|||||||
Batch
|
Batch
|
||||||
}
|
}
|
||||||
|
|
||||||
var ErrUploadBatchFileFailed = errors.New("upload batch file failed")
|
|
||||||
|
|
||||||
// CreateBatch — API call to Create batch.
|
// CreateBatch — API call to Create batch.
|
||||||
func (c *Client) CreateBatch(
|
func (c *Client) CreateBatch(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
@@ -202,7 +199,6 @@ func (c *Client) CreateBatchWithUploadFile(
|
|||||||
Lines: request.Lines,
|
Lines: request.Lines,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = errors.Join(ErrUploadBatchFileFailed, err)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
return c.CreateBatch(ctx, CreateBatchRequest{
|
return c.CreateBatch(ctx, CreateBatchRequest{
|
||||||
|
|||||||
Reference in New Issue
Block a user