From 6dfb554f2f28e8af891fcc9375a18bc48786c843 Mon Sep 17 00:00:00 2001 From: Joseph Lombrozo Date: Thu, 14 Dec 2023 09:28:52 -0500 Subject: [PATCH] log all errors, don't fail silently --- pkg/server/hook_handler.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/server/hook_handler.go b/pkg/server/hook_handler.go index 0da4dbb1..077a47ac 100644 --- a/pkg/server/hook_handler.go +++ b/pkg/server/hook_handler.go @@ -165,6 +165,7 @@ func (h *VCSHookHandler) processCheckEvent(ctx context.Context, repo *repo.Repo) err = cEvent.MergeIntoTarget(ctx) if err != nil { // TODO: Cancel if gitlab etc + log.Error().Err(err).Msg("failed to merge into target") return } @@ -172,6 +173,7 @@ func (h *VCSHookHandler) processCheckEvent(ctx context.Context, repo *repo.Repo) _, err = cEvent.GetListOfChangedFiles(ctx) if err != nil { // TODO: Cancel if gitlab etc + log.Error().Err(err).Msg("failed to get list of changed files") return } @@ -180,6 +182,7 @@ func (h *VCSHookHandler) processCheckEvent(ctx context.Context, repo *repo.Repo) if err != nil { // TODO: Cancel if gitlab etc //mEvent.CancelEvent(ctx, err, "Generate List of Affected Apps") + log.Error().Err(err).Msg("failed to generate a list of affected apps") return }