Skip to content

Commit

Permalink
Merge pull request kubernetes#110076 from karlkfi/patch-1
Browse files Browse the repository at this point in the history
fix: reflector to return wrapped list errors
  • Loading branch information
k8s-ci-robot committed May 17, 2022
2 parents c79b909 + 9ace604 commit f0c47dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion staging/src/k8s.io/client-go/tools/cache/reflector.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error {
initTrace.Step("Objects listed", trace.Field{Key: "error", Value: err})
if err != nil {
klog.Warningf("%s: failed to list %v: %v", r.name, r.expectedTypeName, err)
return fmt.Errorf("failed to list %v: %v", r.expectedTypeName, err)
return fmt.Errorf("failed to list %v: %w", r.expectedTypeName, err)
}

// We check if the list was paginated and if so set the paginatedResult based on that.
Expand Down

0 comments on commit f0c47dc

Please sign in to comment.