From 7bda89e79d458143f7cafe5d6be8a6cbb03f6c0b Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 14 Jun 2021 12:43:53 +0200 Subject: [PATCH] Return error instead of panicking --- pkg/icingaredis/utils.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/icingaredis/utils.go b/pkg/icingaredis/utils.go index 77dc3b31..bd4817b4 100644 --- a/pkg/icingaredis/utils.go +++ b/pkg/icingaredis/utils.go @@ -87,9 +87,7 @@ func SetChecksums(ctx context.Context, entities <-chan contracts.Entity, checksu if checksumer, ok := checksums[entity.ID().String()]; ok { entity.(contracts.Checksumer).SetChecksum(checksumer.(contracts.Checksumer).Checksum()) } else { - panic("no checksum") - // TODO(el): Error is not published - //return errors.New("no checksum") + return errors.Errorf("no checksum for %#v", entity) } select {