Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward@curii.com>
case "NoSuchKey":
return os.ErrNotExist
}
case "NoSuchKey":
return os.ErrNotExist
}
+ } else {
+ switch err.(type) {
+ case *aws.RequestCanceledError:
+ return context.Canceled
+ }
func (v *S3AWSVolume) Put(ctx context.Context, loc string, block []byte) error {
// Do not use putWithPipe here; we want to pass an io.ReadSeeker to the S3
// sdk to avoid memory allocation there. See #17339 for more information.
func (v *S3AWSVolume) Put(ctx context.Context, loc string, block []byte) error {
// Do not use putWithPipe here; we want to pass an io.ReadSeeker to the S3
// sdk to avoid memory allocation there. See #17339 for more information.
- return v.WriteBlock(ctx, loc, bytes.NewReader(block))
+ return v.translateError(v.WriteBlock(ctx, loc, bytes.NewReader(block)))
}
// WriteBlock implements BlockWriter.
}
// WriteBlock implements BlockWriter.