fix: improve error handling in hostscanner pod validation

Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
This commit is contained in:
Matthias Bertschy
2025-10-10 16:13:43 +02:00
parent 7d9d8e4b59
commit 3f80bce811
+1 -1
View File
@@ -96,7 +96,7 @@ func (hsh *HostSensorHandler) Init(ctx context.Context) error {
hsh.populatePodNamesToNodeNames(ctx, log)
if err := hsh.checkPodForEachNode(); err != nil {
logger.L().Ctx(ctx).Warning(failedToValidateHostSensorPodStatus, helpers.Error(err))
return fmt.Errorf("%s: %v", failedToValidateHostSensorPodStatus, err)
}
return nil