{"record":{"id":"d7462f004791c737","repo":"netbirdio/netbird","slug":"refresh-rules-map-w","errorCode":null,"errorMessage":"refresh rules map: %w","messagePattern":"refresh rules map: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/firewall/nftables/router_linux.go","lineNumber":508,"sourceCode":"\tif r.af.tableFamily == nftables.TableFamilyIPv6 {\n\t\treturn iptables.ProtocolIPv6\n\t}\n\treturn iptables.ProtocolIPv4\n}\n\nfunc (r *router) hasRule(id string) bool {\n\t_, ok := r.rules[id]\n\treturn ok\n}\n\nfunc (r *router) hasDNATRule(id string) bool {\n\t_, ok := r.rules[id+dnatSuffix]\n\treturn ok\n}\n\nfunc (r *router) DeleteRouteRule(rule firewall.Rule) error {\n\tif err := r.refreshRulesMap(); err != nil {\n\t\treturn fmt.Errorf(refreshRulesMapError, err)\n\t}\n\n\truleKey := rule.ID()\n\tnftRule, exists := r.rules[ruleKey]\n\tif !exists {\n\t\tlog.Debugf(\"route rule %s not found\", ruleKey)\n\t\treturn nil\n\t}\n\n\tif nftRule.Handle == 0 {\n\t\tlog.Warnf(\"route rule %s has no handle, removing stale entry\", ruleKey)\n\t\tif err := r.decrementSetCounter(nftRule); err != nil {\n\t\t\tlog.Warnf(\"decrement set counter for stale rule %s: %v\", ruleKey, err)\n\t\t}\n\t\tdelete(r.rules, ruleKey)\n\t\treturn nil\n\t}\n","sourceCodeStart":490,"sourceCodeEnd":526,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/firewall/nftables/router_linux.go#L490-L526","documentation":"Error \"refresh rules map: %w\" thrown in netbirdio/netbird.","triggerScenarios":"Thrown at client/firewall/nftables/router_linux.go:508 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c","analyzedAt":"2026-08-16T03:09:19.136Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}