From 142623b8ac86281f619b605908df7f566dbc927b Mon Sep 17 00:00:00 2001 From: Paul Rogers Date: Thu, 26 Sep 2024 09:34:52 -0400 Subject: [PATCH] Wrap error to surface more context --- pkg/storage/chunk/client/util/reader.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/storage/chunk/client/util/reader.go b/pkg/storage/chunk/client/util/reader.go index 2459b1e9ea43a..3722dec69a4cd 100644 --- a/pkg/storage/chunk/client/util/reader.go +++ b/pkg/storage/chunk/client/util/reader.go @@ -2,6 +2,7 @@ package util import ( "bytes" + "fmt" "io" ) @@ -11,7 +12,7 @@ func ReadSeeker(r io.Reader) (io.ReadSeeker, error) { } data, err := io.ReadAll(r) if err != nil { - return nil, err + return nil, fmt.Errorf("Error in ReadSeeker readAll(): %w", err) } return bytes.NewReader(data), nil }