mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-06 05:04:27 +08:00
Ignore stale nodes instead of 500 (#2357)
This commit is contained in:
parent
723375b334
commit
f62eab1d18
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue