From e264092851de70cd63e44ef070922a16b9defd4f Mon Sep 17 00:00:00 2001 From: Shivam-nagar23 Date: Fri, 25 Oct 2024 17:43:40 +0530 Subject: [PATCH] messaging change --- git-sensor/pkg/RepoManages.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/git-sensor/pkg/RepoManages.go b/git-sensor/pkg/RepoManages.go index 3c0ff5377..c4dba86ba 100644 --- a/git-sensor/pkg/RepoManages.go +++ b/git-sensor/pkg/RepoManages.go @@ -373,9 +373,11 @@ func (impl RepoManagerImpl) checkoutMaterial(gitCtx git.GitContext, material *sq impl.logger.Errorw("context error in git checkout", "err", gitCtx.Err()) return material, gitCtx.Err() } else if err != nil { + impl.logger.Errorw("error encountered in adding git repo", "materialId", material.Id, "err", err, "errMsg", errMsg) material.CheckoutStatus = false - material.CheckoutMsgAny = util2.BuildDisplayErrorMessage(errMsg, err) - return nil, err + errorMessage := util2.BuildDisplayErrorMessage(errMsg, err) + material.CheckoutMsgAny = errorMessage + return nil, errors.New(errorMessage) } else { material.CheckoutLocation = checkoutLocationForFetching material.CheckoutStatus = true