Skip to content

Commit

Permalink
Fix: Match wrapped errors (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-shim authored Mar 5, 2024
1 parent bb53a12 commit e83598b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (v *chunkValidator) ValidateBatch(blobs []*BlobMessage, operatorState *Oper
// for each quorum
for _, quorumHeader := range blob.BlobHeader.QuorumInfos {
chunks, assignment, params, err := v.validateBlobQuorum(quorumHeader, blob, operatorState)
if err == ErrBlobQuorumSkip {
if errors.Is(err, ErrBlobQuorumSkip) {
continue
} else if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ func (n *Node) ProcessBatch(ctx context.Context, header *core.BatchHeader, blobs
if err != nil {
// If batch already exists, we don't store it again, but we should not
// error out in such case.
if err == ErrBatchAlreadyExist {
if errors.Is(err, ErrBatchAlreadyExist) {
storeChan <- storeResult{err: nil, keys: nil, latency: 0}
} else {
storeChan <- storeResult{err: fmt.Errorf("failed to store batch: %w", err), keys: nil, latency: 0}
Expand Down

0 comments on commit e83598b

Please sign in to comment.