{"record":{"id":"d727f160e62e4fa5","repo":"netbirdio/netbird","slug":"parse-tx-bytes-w","errorCode":null,"errorMessage":"parse tx_bytes: %w","messagePattern":"parse tx_bytes: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/iface/configurer/usp.go","lineNumber":419,"sourceCode":"\t\tswitch key[0] {\n\t\tcase ipcKeyLastHandshakeTimeSec:\n\t\t\ths, err := toLastHandshake(key[1])\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tcurrentStats.LastHandshake = hs\n\t\t\tstats[currentKey] = currentStats\n\t\tcase ipcKeyRxBytes:\n\t\t\trxBytes, err := toBytes(key[1])\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"parse rx_bytes: %w\", err)\n\t\t\t}\n\t\t\tcurrentStats.RxBytes = rxBytes\n\t\t\tstats[currentKey] = currentStats\n\t\tcase ipcKeyTxBytes:\n\t\t\tTxBytes, err := toBytes(key[1])\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"parse tx_bytes: %w\", err)\n\t\t\t}\n\t\t\tcurrentStats.TxBytes = TxBytes\n\t\t\tstats[currentKey] = currentStats\n\t\t}\n\t}\n\n\treturn stats, nil\n}\n\nfunc toWgUserspaceString(wgCfg wgtypes.Config) string {\n\tvar sb strings.Builder\n\tif wgCfg.PrivateKey != nil {\n\t\thexKey := hex.EncodeToString(wgCfg.PrivateKey[:])\n\t\tsb.WriteString(fmt.Sprintf(\"private_key=%s\\n\", hexKey))\n\t}\n\n\tif wgCfg.ListenPort != nil {\n\t\tsb.WriteString(fmt.Sprintf(\"listen_port=%d\\n\", *wgCfg.ListenPort))","sourceCodeStart":401,"sourceCodeEnd":437,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/iface/configurer/usp.go#L401-L437","documentation":"Error \"parse tx_bytes: %w\" thrown in netbirdio/netbird.","triggerScenarios":"Thrown at client/iface/configurer/usp.go:419 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"}