From 161c6fad3b85f771793d49adaaefafa5d88bbd02 Mon Sep 17 00:00:00 2001 From: Shashwat Dadhich <92629050+ShashwatDadhich@users.noreply.github.com> Date: Thu, 25 Apr 2024 13:31:59 +0530 Subject: [PATCH] fix: Kubelink Requests getting Failed for gRPC method GetAppDetails (#5012) * fixed * code review comments --- api/restHandler/app/appList/AppListingRestHandler.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/restHandler/app/appList/AppListingRestHandler.go b/api/restHandler/app/appList/AppListingRestHandler.go index 373f14bf85b..a0330f41042 100644 --- a/api/restHandler/app/appList/AppListingRestHandler.go +++ b/api/restHandler/app/appList/AppListingRestHandler.go @@ -980,6 +980,10 @@ func (handler AppListingRestHandlerImpl) getAppDetails(ctx context.Context, appI // TODO: move this to service func (handler AppListingRestHandlerImpl) fetchResourceTree(w http.ResponseWriter, r *http.Request, appId int, envId int, acdToken string, cdPipeline *pipelineConfig.Pipeline) (map[string]interface{}, error) { var resourceTree map[string]interface{} + if !cdPipeline.DeploymentAppCreated { + handler.logger.Infow("deployment for this pipeline does not exist", "pipelineId", cdPipeline.Id) + return resourceTree, nil + } if len(cdPipeline.DeploymentAppName) > 0 && cdPipeline.EnvironmentId > 0 && util.IsAcdApp(cdPipeline.DeploymentAppType) { // RBAC enforcer Ends query := &application2.ResourcesQuery{