We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5cf87e6 commit 7567735Copy full SHA for 7567735
1 file changed
cmd/non-admin/backup/create.go
@@ -259,7 +259,7 @@ func (o *CreateOptions) Run(c *cobra.Command, f client.Factory) error {
259
ObjectList: new(nacv1alpha1.NonAdminBackupList),
260
}
261
backupInformer := cache.NewSharedInformer(&lw, &nacv1alpha1.NonAdminBackup{}, time.Second)
262
- _, _ = backupInformer.AddEventHandler(
+ _, err = backupInformer.AddEventHandler(
263
cache.FilteringResourceEventHandler{
264
FilterFunc: func(obj any) bool {
265
backup, ok := obj.(*nacv1alpha1.NonAdminBackup)
@@ -287,6 +287,9 @@ func (o *CreateOptions) Run(c *cobra.Command, f client.Factory) error {
287
},
288
289
)
290
+ if err != nil {
291
+ return fmt.Errorf("failed to add event handler: %w", err)
292
+ }
293
294
go backupInformer.Run(stop)
295
0 commit comments