mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-05 16:57:51 +08:00
Ignore stale nodes instead of 500 (#2357)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user