Skip to content

Commit

Permalink
sidecar: Handle error correctly inside DispatchWatcher
Browse files Browse the repository at this point in the history
This patch propagates the error returned from getCSIAddonsNode

Signed-off-by: Niraj Yadav <niryadav@redhat.com>
  • Loading branch information
black-dragon74 committed Mar 7, 2025
1 parent 525a422 commit cf01646
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sidecar/internal/csiaddonsnode/csiaddonsnode.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ func (mgr *Manager) DispatchWatcher() error {
retryCount := 0
node, err := mgr.getCSIAddonsNode()
if err != nil {
return errors.New("failed to get CSIAddonsNode object")
return fmt.Errorf("failed to get CSIAddonsNode object due to error: %w", err)
}

for retryCount < int(watcherRetryCount) {
Expand Down

0 comments on commit cf01646

Please sign in to comment.