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:
rubyist 2015-09-02 11:32:04 -04:00
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)