Browse Source

Ignore stale nodes instead of 500 (#2357)

Tobias Cudnik 2 years ago
parent
commit
f62eab1d18
1 changed files with 2 additions and 2 deletions
  1. 2 2
      controllers/hosts.go

+ 2 - 2
controllers/hosts.go

@@ -71,8 +71,8 @@ func getHosts(w http.ResponseWriter, r *http.Request) {
 			node, err := logic.GetNodeByID(nid)
 			if err != nil {
 				logger.Log(0, r.Header.Get("user"), "failed to fetch node: ", err.Error())
-				logic.ReturnErrorResponse(w, r, logic.FormatError(err, "internal"))
-				return
+				// TODO find the reason for the DB error, skip this node for now
+				continue
 			}
 			if !isMasterAdmin && !logic.UserHasNetworksAccess([]string{node.Network}, user) {
 				continue