We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d86e550 commit 7f9e316Copy full SHA for 7f9e316
1 file changed
backends/s3/stream.go
@@ -2,8 +2,10 @@ package s3
2
3
import (
4
"context"
5
+ "errors"
6
"io"
7
8
+ "github.com/PowerDNS/simpleblob"
9
"github.com/minio/minio-go/v7"
10
)
11
@@ -86,7 +88,7 @@ type writerWrapper struct {
86
88
87
89
func (w *writerWrapper) Write(p []byte) (n int, err error) {
90
if w.closed {
- return 0, w.prevErr
91
+ return 0, errors.Join(w.prevErr, simpleblob.ErrClosed)
92
}
93
if err := context.Cause(w.ctx); err != nil {
94
_ = w.Close()
@@ -99,7 +101,7 @@ func (w *writerWrapper) Write(p []byte) (n int, err error) {
99
101
100
102
func (w *writerWrapper) Close() error {
103
- return w.prevErr
104
+ return errors.Join(w.prevErr, simpleblob.ErrClosed)
105
106
w.closed = true
107
w.prevErr = context.Cause(w.ctx)
0 commit comments