Skip to content

Commit

Permalink
fix: app overview panic for helm app (#5863)
Browse files Browse the repository at this point in the history
* fix app overview panic

* else if instead of if
  • Loading branch information
iamayushm authored Sep 19, 2024
1 parent 7b8bac7 commit ee06e41
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions api/appStore/InstalledAppRestHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ func (handler *InstalledAppRestHandlerImpl) FetchAppOverview(w http.ResponseWrit
token := r.Header.Get("token")
handler.Logger.Infow("request payload, FindAppOverview", "installedAppId", installedAppId)
installedApp, err := handler.installedAppService.GetInstalledAppById(installedAppId)
if err != nil && err != pg.ErrNoRows {
common.WriteJsonResp(w, err, nil, http.StatusInternalServerError)
return
} else if err == pg.ErrNoRows || installedApp == nil {
common.WriteJsonResp(w, errors.New("helm app doses not exist"), nil, http.StatusNotFound)
return
}
appOverview, err := handler.appCrudOperationService.GetAppMetaInfo(installedApp.AppId, installedAppId, installedApp.EnvironmentId)
if err != nil {
handler.Logger.Errorw("service err, FetchAppOverview", "err", err, "appId", installedApp.AppId, "installedAppId", installedAppId)
Expand Down

0 comments on commit ee06e41

Please sign in to comment.