Skip to content

Commit

Permalink
Update blox.go
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan6sha committed Mar 28, 2024
1 parent 1b63912 commit b9f47bb
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions blox/blox.go
Original file line number Diff line number Diff line change
Expand Up @@ -743,16 +743,18 @@ func (p *Blox) Start(ctx context.Context) error {
}
// If available then submit to store
_, err = p.bl.HandleManifestBatchStore(context.TODO(), p.topicName, availableLinks)
if strings.Contains(err.Error(), "AccountAlreadyStorer") {
// Log the occurrence of the specific error but do not continue
log.Warnw("Attempt to store with an account that is already a storer", "err", err, "p.topicName", p.topicName, "availableLinks", availableLinks)
} else if strings.Contains(err.Error(), "Transaction is outdated") {
continue
} else {
// For any other error, log and continue
log.Errorw("Error calling HandleManifestBatchStore", "err", err, "p.topicName", p.topicName, "availableLinks", availableLinks)
p.UpdateFailedCids(availableLinks)
//continue
if err != nil {
if strings.Contains(err.Error(), "AccountAlreadyStorer") {
// Log the occurrence of the specific error but do not continue
log.Warnw("Attempt to store with an account that is already a storer", "err", err, "p.topicName", p.topicName, "availableLinks", availableLinks)
} else if strings.Contains(err.Error(), "Transaction is outdated") {
continue
} else {
// For any other error, log and continue
log.Errorw("Error calling HandleManifestBatchStore", "err", err, "p.topicName", p.topicName, "availableLinks", availableLinks)
p.UpdateFailedCids(availableLinks)
//continue
}
}
}
}
Expand Down

0 comments on commit b9f47bb

Please sign in to comment.