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 <sonia@tailscale.com>
pull/10530/head
Sonia Appasamy 7 months ago committed by Sonia Appasamy
parent 86aa0485a6
commit 7c172df791

@ -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,

Loading…
Cancel
Save