[arvados] created: 2.1.0-2947-g764c0c414
git repository hosting
git at public.arvados.org
Sat Oct 8 01:36:02 UTC 2022
at 764c0c4140ec17de63b16f185fa0cbfa9b5ef79f (commit)
commit 764c0c4140ec17de63b16f185fa0cbfa9b5ef79f
Author: Tom Clegg <tom at curii.com>
Date: Fri Oct 7 21:35:36 2022 -0400
Include relevant block ID in "block not found" error message.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/sdk/go/keepclient/block_cache.go b/sdk/go/keepclient/block_cache.go
index bac4a24fd..89eecc6e2 100644
--- a/sdk/go/keepclient/block_cache.go
+++ b/sdk/go/keepclient/block_cache.go
@@ -5,6 +5,7 @@
package keepclient
import (
+ "fmt"
"io"
"sort"
"strconv"
@@ -93,8 +94,11 @@ func (c *BlockCache) Get(kc *KeepClient, locator string) ([]byte, error) {
data = make([]byte, size, bufsize)
_, err = io.ReadFull(rdr, data)
err2 := rdr.Close()
- if err == nil {
- err = err2
+ if err == nil && err2 != nil {
+ err = fmt.Errorf("close(): %w", err2)
+ }
+ if err != nil {
+ err = fmt.Errorf("Get %s: %w", locator, err)
}
}
c.mtx.Lock()
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list