Skip to content

Commit

Permalink
Followup to fix review comments from #1743 (#1764)
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <[email protected]>
  • Loading branch information
bogdandrutu authored Sep 11, 2020
1 parent 9676763 commit c0b3c61
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions component/componenterror/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ func CombineErrors(errs []error) error {
}
errMsgs = append(errMsgs, err.Error())
}
err := fmt.Errorf("[%s]", strings.Join(errMsgs, "; "))
if permanent {
return consumererror.Permanent(fmt.Errorf("[%s]", strings.Join(errMsgs, "; ")))
err = consumererror.Permanent(err)
}
return fmt.Errorf("[%s]", strings.Join(errMsgs, "; "))
return err
}

0 comments on commit c0b3c61

Please sign in to comment.