client/web: fix 500 error after logout

Calling DebugPacketFilterRules fails when the node is not logged
in, which was causing 500 errors on the node data endpoint after
logging the node out.

Updates #10261

Signed-off-by: Sonia Appasamy <[email protected]>
This commit is contained in:
Sonia Appasamy authored and Sonia Appasamy committed 2023-12-08 17:17:50 -05:00
1 parent 86aa0485a6
commit 7c172df791
1 file changed
+1 -5
+1 -5
View File
@@ -601,11 +601,7 @@ func (s *Server) serveGetNodeData(w http.ResponseWriter, r *http.Request) {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
filterRules, err := s.lc.DebugPacketFilterRules(r.Context())
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
filterRules, _ := s.lc.DebugPacketFilterRules(r.Context())
data := &nodeData{
ID: st.Self.ID,
Status: st.BackendState,