Skip to content

Commit

Permalink
Wrap error to surface more context
Browse files Browse the repository at this point in the history
  • Loading branch information
paul1r committed Sep 26, 2024
1 parent c899316 commit 142623b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/storage/chunk/client/util/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package util

import (
"bytes"
"fmt"
"io"
)

Expand All @@ -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
}

0 comments on commit 142623b

Please sign in to comment.