Skip to content

Commit

Permalink
log all errors, don't fail silently
Browse files Browse the repository at this point in the history
  • Loading branch information
djeebus committed Dec 14, 2023
1 parent da0ddd9 commit 6dfb554
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/server/hook_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,15 @@ 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
}

// Get the diff between the two branches, storing them within the CheckEvent (also returns but discarded here)
_, 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
}

Expand All @@ -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
}

Expand Down

0 comments on commit 6dfb554

Please sign in to comment.