Skip to content

Commit fff72d5

Browse files
authored
fix: update grpc upload error diagnostics to be tolerant of receiving an error if no request has been sent (#2732)
1 parent a14cd37 commit fff72d5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

google-cloud-storage/src/main/java/com/google/cloud/storage/GapicBidiUnbufferedWritableByteChannel.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,9 @@ public void onError(Throwable t) {
367367
tmp.getCode(),
368368
tmp.getMessage(),
369369
tmp.getReason(),
370-
ImmutableList.of(lastWrittenRequest),
370+
lastWrittenRequest != null
371+
? ImmutableList.of(lastWrittenRequest)
372+
: ImmutableList.of(),
371373
null,
372374
context,
373375
t);

0 commit comments

Comments
 (0)