Skip to content

Commit

Permalink
blockfetcher: add more details to errors
Browse files Browse the repository at this point in the history
Close #3629

Signed-off-by: Ekaterina Pavlova <[email protected]>
  • Loading branch information
AliceInHunterland committed Oct 21, 2024
1 parent 29bb3ff commit bb4d628
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/services/blockfetcher/blockfetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func (bfs *Service) blockDownloader() {
if isContextCanceledErr(err) {
return
}
bfs.log.Error("failed to objectGet block", zap.Error(err))
bfs.log.Error("failed to objectGet block oid", zap.String("oid", blkOid.String()), zap.Error(err))

Check warning on line 208 in pkg/services/blockfetcher/blockfetcher.go

View check run for this annotation

Codecov / codecov/patch

pkg/services/blockfetcher/blockfetcher.go#L208

Added line #L208 was not covered by tests
bfs.stopService(true)
return
}
Expand All @@ -215,7 +215,7 @@ func (bfs *Service) blockDownloader() {
if isContextCanceledErr(err) {
return
}
bfs.log.Error("failed to read block", zap.Error(err))
bfs.log.Error("failed to read block oid", zap.String("oid", blkOid.String()), zap.Error(err))

Check warning on line 218 in pkg/services/blockfetcher/blockfetcher.go

View check run for this annotation

Codecov / codecov/patch

pkg/services/blockfetcher/blockfetcher.go#L218

Added line #L218 was not covered by tests
bfs.stopService(true)
return
}
Expand All @@ -238,7 +238,7 @@ func (bfs *Service) blockQueuer() {
default:
err := bfs.enqueueBlock(b)
if err != nil {
bfs.log.Error("failed to enqueue block", zap.Error(err))
bfs.log.Error("failed to enqueue block with index", zap.Uint32("index", b.Index), zap.Error(err))

Check warning on line 241 in pkg/services/blockfetcher/blockfetcher.go

View check run for this annotation

Codecov / codecov/patch

pkg/services/blockfetcher/blockfetcher.go#L241

Added line #L241 was not covered by tests
bfs.stopService(true)
return
}
Expand Down

0 comments on commit bb4d628

Please sign in to comment.