diff --git a/api/server/routes_list.go b/api/server/routes_list.go index a854a1522..7f8a091f5 100644 --- a/api/server/routes_list.go +++ b/api/server/routes_list.go @@ -23,6 +23,7 @@ func (s *Server) handleRouteList(c *gin.Context) { name, ok := appName.(string) if exists && ok && name != "" { routes, err = s.Datastore.GetRoutesByApp(ctx, name, filter) + // if there are no routes for the app, check if the app exists to return 404 if it does not if len(routes) == 0 { _, err = s.Datastore.GetApp(ctx, name) }