Skip to content

Commit 3fadb86

Browse files
committed
return the cause
1 parent 547915e commit 3fadb86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

store/store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ func (s *Store[H]) deleteRange(ctx context.Context, from, to uint64) (err error)
507507
func (s *Store[H]) delete(ctx context.Context, height uint64, batch datastore.Batch, onDelete []func(ctx context.Context, height uint64) error) error {
508508
// some of the methods may not handle context cancellation properly
509509
if ctx.Err() != nil {
510-
return ctx.Err()
510+
return context.Cause(ctx)
511511
}
512512

513513
hash, err := s.heightIndex.HashByHeight(ctx, height, false)

0 commit comments

Comments
 (0)