Skip to content

Commit

Permalink
fix #540 (#246)
Browse files Browse the repository at this point in the history
* fix #540

Signed-off-by: Horiodino <[email protected]>

* fix after review

Signed-off-by: Horiodino <[email protected]>

* fxi after review

Signed-off-by: Horiodino <[email protected]>

---------

Signed-off-by: Horiodino <[email protected]>
  • Loading branch information
Horiodino authored Jul 11, 2024
1 parent 3fec1a2 commit 4e34d7d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index/server/pkg/server/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,12 @@ func buildIndexAPIResponse(c *gin.Context, indexType string, wantV1Index bool, p
if params.Deprecated != nil {
util.FilterDevfileDeprecated(&index, *params.Deprecated, wantV1Index)
}
if index == nil || len(index) == 0 {
c.JSON(http.StatusOK, gin.H{
"status": "No stacks or samples found in the registry",
})
return
}

if wantV1Index {
index = util.ConvertToOldIndexFormat(index)
Expand Down

0 comments on commit 4e34d7d

Please sign in to comment.