Skip to content

Commit

Permalink
return nil,err on git material fetch error (#4857)
Browse files Browse the repository at this point in the history
  • Loading branch information
prakash100198 authored Apr 2, 2024
1 parent ac6802f commit 907142d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/pipeline/CiHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ func (impl *CiHandlerImpl) FetchMaterialsByPipelineId(pipelineId int, showAll bo
impl.Logger.Debugw("commits for material ", "m", m, "commits: ", changesResp)
if apiErr != nil {
impl.Logger.Warnw("git sensor FetchChanges failed for material", "id", m.Id)
return []pipelineConfig.CiPipelineMaterialResponse{}, apiErr
return nil, apiErr
}
ciMaterialHistoryMap[m] = changesResp
}
Expand Down Expand Up @@ -459,7 +459,7 @@ func (impl *CiHandlerImpl) FetchMaterialsByPipelineId(pipelineId int, showAll bo
regexMaterials, err := impl.ciPipelineMaterialRepository.GetRegexByPipelineId(pipelineId)
if err != nil {
impl.Logger.Errorw("regex ciMaterials fetch failed", "err", err)
return []pipelineConfig.CiPipelineMaterialResponse{}, err
return nil, err
}
for _, k := range regexMaterials {
r := pipelineConfig.CiPipelineMaterialResponse{
Expand Down

0 comments on commit 907142d

Please sign in to comment.