{"record":{"id":"b71105328da7672c","repo":"netbirdio/netbird","slug":"error-marshaling-sync-response","errorCode":null,"errorMessage":"Error marshaling sync response: {}","messagePattern":"Error marshaling sync response: (.+?)","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"proxy/internal/debug/handler.go","lineNumber":527,"sourceCode":"\t\thttp.Error(w, \"Error getting sync response: \"+err.Error(), http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tif syncResp == nil {\n\t\thttp.Error(w, \"No sync response available for client: \"+string(accountID), http.StatusNotFound)\n\t\treturn\n\t}\n\n\topts := protojson.MarshalOptions{\n\t\tEmitUnpopulated: true,\n\t\tUseProtoNames:   true,\n\t\tIndent:          \"  \",\n\t\tAllowPartial:    true,\n\t}\n\n\tjsonBytes, err := opts.Marshal(syncResp)\n\tif err != nil {\n\t\thttp.Error(w, \"Error marshaling sync response: \"+err.Error(), http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tif wantJSON {\n\t\tw.Header().Set(\"Content-Type\", \"application/json\")\n\t\t_, _ = w.Write(jsonBytes)\n\t\treturn\n\t}\n\n\tdata := clientDetailData{\n\t\tAccountID: string(accountID),\n\t\tActiveTab: \"syncresponse\",\n\t\tContent:   string(jsonBytes),\n\t}\n\n\th.renderTemplate(w, \"clientDetail\", data)\n}\n","sourceCodeStart":509,"sourceCodeEnd":545,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/proxy/internal/debug/handler.go#L509-L545","documentation":"Error \"Error marshaling sync response: {}\" thrown in netbirdio/netbird.","triggerScenarios":"Thrown at proxy/internal/debug/handler.go:527 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"}