Skip to content

Commit 161c6fa

Browse files
ShashwatDadhichkomalreddy3
authored andcommitted
fix: Kubelink Requests getting Failed for gRPC method GetAppDetails (#5012)
* fixed * code review comments
1 parent 7609112 commit 161c6fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api/restHandler/app/appList/AppListingRestHandler.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,10 @@ func (handler AppListingRestHandlerImpl) getAppDetails(ctx context.Context, appI
980980
// TODO: move this to service
981981
func (handler AppListingRestHandlerImpl) fetchResourceTree(w http.ResponseWriter, r *http.Request, appId int, envId int, acdToken string, cdPipeline *pipelineConfig.Pipeline) (map[string]interface{}, error) {
982982
var resourceTree map[string]interface{}
983+
if !cdPipeline.DeploymentAppCreated {
984+
handler.logger.Infow("deployment for this pipeline does not exist", "pipelineId", cdPipeline.Id)
985+
return resourceTree, nil
986+
}
983987
if len(cdPipeline.DeploymentAppName) > 0 && cdPipeline.EnvironmentId > 0 && util.IsAcdApp(cdPipeline.DeploymentAppType) {
984988
// RBAC enforcer Ends
985989
query := &application2.ResourcesQuery{

0 commit comments

Comments
 (0)