mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-09 13:26:52 +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)
|
node, err := logic.GetNodeByID(nid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Log(0, r.Header.Get("user"), "failed to fetch node: ", err.Error())
|
logger.Log(0, r.Header.Get("user"), "failed to fetch node: ", err.Error())
|
||||||
logic.ReturnErrorResponse(w, r, logic.FormatError(err, "internal"))
|
// TODO find the reason for the DB error, skip this node for now
|
||||||
return
|
continue
|
||||||
}
|
}
|
||||||
if !isMasterAdmin && !logic.UserHasNetworksAccess([]string{node.Network}, user) {
|
if !isMasterAdmin && !logic.UserHasNetworksAccess([]string{node.Network}, user) {
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Add table
Reference in a new issue