Skip to content

Commit bc46e3d

Browse files
committed
apiextensions: replace panic with error handling in DiscoveryController
Signed-off-by: Omer Aplatony <[email protected]>
1 parent e305c33 commit bc46e3d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,8 @@ func (c *DiscoveryController) Run(stopCh <-chan struct{}, synchedCh chan<- struc
320320
utilruntime.HandleError(fmt.Errorf("timed out waiting for initial discovery sync"))
321321
return
322322
}
323-
panic(fmt.Errorf("unexpected error: %v", err))
323+
utilruntime.HandleError(fmt.Errorf("unexpected error: %v", err))
324+
return
324325
}
325326
close(synchedCh)
326327

0 commit comments

Comments
 (0)