Skip to content

Commit

Permalink
use xerrors.Wrapf()
Browse files Browse the repository at this point in the history
  • Loading branch information
vpranckaitis committed Dec 16, 2020
1 parent aec8152 commit 7644c0e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/dbnode/client/fetch_tagged_results_accumulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,10 @@ func (accum *fetchTaggedResultAccumulator) accumulatedResult(
responded := enqueued
consistencyErr := newConsistencyResultError(accum.consistencyLevel, enqueued, responded,
accum.errors)
err := fmt.Errorf("unable to satisfy consistency requirements: shards=%d, err=%v",
err := xerrors.Wrapf(
consistencyErr,
"unable to satisfy consistency requirements: shards=%d, err=%v",
accum.numShardsPending, consistencyErr)
err = xerrors.NewRenamedError(consistencyErr, err)
for i := range accum.errors {
if IsBadRequestError(accum.errors[i]) {
err = xerrors.NewInvalidParamsError(err)
Expand Down

0 comments on commit 7644c0e

Please sign in to comment.