{"record":{"id":"89b1d43d791033bb","repo":"weaviate/weaviate","slug":"marshal-object-q-w","errorCode":null,"errorMessage":"marshal object %q: %w","messagePattern":"marshal object %q: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"usecases/replica/replica.go","lineNumber":96,"sourceCode":"\n\treturn nil\n}\n\ntype Replicas []Replica\n\nfunc (ro Replicas) MarshalBinary() ([]byte, error) {\n\tms := make([]robjectMarshaler, len(ro))\n\n\tfor i, obj := range ro {\n\t\tm := robjectMarshaler{\n\t\t\tID:                      obj.ID,\n\t\t\tDeleted:                 obj.Deleted,\n\t\t\tLastUpdateTimeUnixMilli: obj.LastUpdateTimeUnixMilli,\n\t\t}\n\t\tif obj.Object != nil {\n\t\t\tb, err := obj.Object.MarshalBinary()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"marshal object %q: %w\", obj.ID, err)\n\t\t\t}\n\t\t\tm.Object = b\n\t\t}\n\t\tms[i] = m\n\t}\n\n\treturn json.Marshal(ms)\n}\n\nfunc (ro *Replicas) UnmarshalBinary(data []byte) error {\n\tvar ms []robjectMarshaler\n\n\terr := json.Unmarshal(data, &ms)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treps := make(Replicas, len(ms))","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/usecases/replica/replica.go#L78-L114","documentation":"Wrapped error from Replicas.MarshalBinary when an individual replica's storobj.Object fails binary serialization during a Replicas batch encode (used in replication transports). The failing object's ID is included; the underlying storobj error is chained.","triggerScenarios":"Thrown at usecases/replica/replica.go:96 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error to see which part of the object failed to serialize","Check for unsupported property types or oversized payloads on the named object","Verify schema/object version compatibility between sender and receiver"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"75aa4b6d11f8818305aafd4440b4e32794f7ca04","analyzedAt":"2026-09-04T14:58:20.392Z","contentChangedAt":"2026-09-04T14:58:20.392Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}