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{