@@ -256,7 +256,7 @@ private Single<List<PathMetadata>> queryRemoteCache(
256
256
return toSingle (() -> remoteCache .findMissingDigests (context , digestsToQuery ), executor )
257
257
.onErrorResumeNext (
258
258
error -> {
259
- reporterUploadError (error );
259
+ reportUploadError (error , null , null );
260
260
// Assuming all digests are missing if failed to query
261
261
return Single .just (ImmutableSet .copyOf (digestsToQuery ));
262
262
})
@@ -267,13 +267,19 @@ private Single<List<PathMetadata>> queryRemoteCache(
267
267
});
268
268
}
269
269
270
- private void reporterUploadError (Throwable error ) {
270
+ private void reportUploadError (Throwable error , Path path , Digest digest ) {
271
271
if (error instanceof CancellationException ) {
272
272
return ;
273
273
}
274
274
275
- String errorMessage =
276
- "Uploading BEP referenced local files: " + grpcAwareErrorMessage (error , verboseFailures );
275
+ String errorMessage = "Uploading BEP referenced local file" ;
276
+ if (path != null ) {
277
+ errorMessage += " " + path ;
278
+ }
279
+ if (digest != null ) {
280
+ errorMessage += " " + digest ;
281
+ }
282
+ errorMessage += ": " + grpcAwareErrorMessage (error , verboseFailures );
277
283
278
284
reporter .handle (Event .warn (errorMessage ));
279
285
}
@@ -298,11 +304,11 @@ private Single<List<PathMetadata>> uploadLocalFiles(
298
304
path .isDirectory (),
299
305
// set remote to true so the PathConverter will use bytestream://
300
306
// scheme to convert the URI for this file
301
- /*remote=*/ true ,
307
+ /* remote= */ true ,
302
308
path .isOmitted ()))
303
309
.onErrorResumeNext (
304
310
error -> {
305
- reporterUploadError (error );
311
+ reportUploadError (error , path . getPath (), path . getDigest () );
306
312
return Single .just (path );
307
313
});
308
314
})
@@ -329,7 +335,7 @@ private Single<PathConverter> upload(Set<Path> files) {
329
335
try {
330
336
return readPathMetadata (file );
331
337
} catch (IOException e ) {
332
- reporterUploadError ( e );
338
+ reportUploadError ( e , file , null );
333
339
return new PathMetadata (
334
340
file ,
335
341
/* digest= */ null ,
0 commit comments