Skip to content

Commit

Permalink
ccl,server: error.Wrap on previously handled errors
Browse files Browse the repository at this point in the history
These errors.Wrap calls are wrapping errors that are nil and thus will
always return a nil error.

Release justification: Minor error handling fixes
Release note: None
  • Loading branch information
stevendanna committed Mar 5, 2021
1 parent 9ccda03 commit cda1912
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/ccl/backupccl/backup_planning.go
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ func backupPlanHook(
return errors.Wrap(err, "invalid previous backups")
}
if coveredTime != startTime {
return errors.Wrapf(err, "expected previous backups to cover until time %v, got %v", startTime, coveredTime)
return errors.Errorf("expected previous backups to cover until time %v, got %v", startTime, coveredTime)
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/ccl/importccl/read_import_workload.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func (w *workloadReader) readFiles(
}
}
if t.Name == `` {
return errors.Wrapf(err, `unknown table %s for generator %s`, conf.Table, meta.Name)
return errors.Errorf(`unknown table %s for generator %s`, conf.Table, meta.Name)
}

wc := NewWorkloadKVConverter(
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func bootstrapCluster(
if i == 0 {
bootstrapVersion = cv
} else if bootstrapVersion != cv {
return nil, errors.Wrapf(err, "found cluster versions %s and %s", bootstrapVersion, cv)
return nil, errors.Errorf("found cluster versions %s and %s", bootstrapVersion, cv)
}

sIdent := roachpb.StoreIdent{
Expand Down

0 comments on commit cda1912

Please sign in to comment.