From 5ed3e79b6336d9d14eb6b8fa48b491e5ba915f97 Mon Sep 17 00:00:00 2001 From: Denis Makogon Date: Tue, 25 Jul 2017 20:09:05 +0300 Subject: [PATCH] Adding comment with the reason for doing this --- api/server/routes_list.go | 1 + 1 file changed, 1 insertion(+) 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) }