a bunch of fixes for error handling (#19627)

- handle errFileCorrupt properly
- micro-optimization of sending done() response quicker
  to close the goroutine.
- fix logger.Event() usage in a couple of places
- handle the rest of the client to return a different error other than
  lastErr() when the client is closed.
This commit is contained in:
Harshavardhana
2024-04-28 10:53:50 -07:00
committed by GitHub
parent 93b2f8a0c5
commit a372c6a377
10 changed files with 121 additions and 37 deletions

View File

@@ -403,7 +403,7 @@ func writeUniqueFileInfo(ctx context.Context, disks []StorageAPI, origbucket, bu
if fi.IsValid() {
return disks[index].WriteMetadata(ctx, origbucket, bucket, prefix, fi)
}
return errCorruptedFormat
return errFileCorrupt
}, index)
}