Move this retriable error up higher
It should only retry in the case where the error is not nil and it did not get any kind of http response (e.g. a network error). If it got a response, this operation should not retry.
This commit is contained in:
parent
d5d33a385c
commit
a3676a1e2d
@ -199,7 +199,7 @@ func Batch(objects []*objectResource, operation string) ([]*objectResource, erro
|
||||
res, objs, err := doApiBatchRequest(req)
|
||||
if err != nil {
|
||||
if res == nil {
|
||||
return nil, err
|
||||
return nil, newRetriableError(err)
|
||||
}
|
||||
|
||||
switch res.StatusCode {
|
||||
@ -213,7 +213,6 @@ func Batch(objects []*objectResource, operation string) ([]*objectResource, erro
|
||||
}
|
||||
|
||||
tracerx.Printf("api error: %s", err)
|
||||
return nil, newRetriableError(err)
|
||||
}
|
||||
LogTransfer("lfs.api.batch", res)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user