@@ -150,7 +150,7 @@ func (c *HTTPClient) performOperation(ctx context.Context, objects []Pointer, dc
150
150
151
151
// performSingleOperation performs an LFS upload or download operation on a single object
152
152
func performSingleOperation (ctx context.Context , object * ObjectResponse , dc DownloadCallback , uc UploadCallback , transferAdapter TransferAdapter ) error {
153
- // the response from an lfs batch api request for this specific object id contained an error
153
+ // the response from a lfs batch api request for this specific object id contained an error
154
154
if object .Error != nil {
155
155
log .Trace ("Error on object %v: %v" , object .Pointer , object .Error )
156
156
@@ -161,15 +161,12 @@ func performSingleOperation(ctx context.Context, object *ObjectResponse, dc Down
161
161
}
162
162
} else {
163
163
// this was NOT an 'upload' request inside the batch request, meaning it must be a 'download' request
164
- err := dc (object .Pointer , nil , object .Error )
165
- if errors .Is (object .Error , ErrObjectNotExist ) {
166
- log .Warn ("Ignoring missing upstream LFS object %-v: %v" , object .Pointer , err )
167
- return nil
164
+ if err := dc (object .Pointer , nil , object .Error ); err != nil {
165
+ return err
168
166
}
169
-
170
- // this was a 'download' request which was a legitimate error response from the batch api (not an http/404)
171
- return err
172
167
}
168
+ // if the callback returns no err, then the error could be ignored, and the operations should continue
169
+ return nil
173
170
}
174
171
175
172
// the response from an lfs batch api request contained necessary upload/download fields to act upon
0 commit comments