{"record":{"id":"9b86db07907ba660","repo":"kopia/kopia","slug":"error-getting-content-info-for-v","errorCode":null,"errorMessage":"error getting content info for %v","messagePattern":"error getting content info for (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"repo/object/object_reader.go","lineNumber":27,"sourceCode":"\t\"github.com/pkg/errors\"\n\n\t\"github.com/kopia/kopia/repo/compression\"\n\t\"github.com/kopia/kopia/repo/content\"\n)\n\n// Open creates new ObjectReader for reading given object from a repository.\nfunc Open(ctx context.Context, r contentReader, objectID ID) (Reader, error) {\n\treturn openAndAssertLength(ctx, r, objectID, -1)\n}\n\n// VerifyObject ensures that all objects backing ObjectID are present in the repository\n// and returns the content IDs of which it is composed.\nfunc VerifyObject(ctx context.Context, cr contentReader, oid ID) ([]content.ID, error) {\n\ttracker := &contentIDTracker{}\n\n\tif err := iterateBackingContents(ctx, cr, oid, tracker, func(contentID content.ID) error {\n\t\tif _, err := cr.ContentInfo(ctx, contentID); err != nil {\n\t\t\treturn errors.Wrapf(err, \"error getting content info for %v\", contentID)\n\t\t}\n\n\t\treturn nil\n\t}); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn tracker.contentIDs(), nil\n}\n\ntype objectReader struct {\n\t// objectReader implements io.Reader, but needs context to read from repository\n\tctx context.Context //nolint:containedctx\n\n\tcr contentReader\n\n\tseekTable []IndirectObjectEntry\n","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/kopia/kopia/blob/82495e54b584c1ef6073c9e1be048f57f8aef078/repo/object/object_reader.go#L9-L45","documentation":"VerifyObject walks the backing contents of an object and calls cr.ContentInfo for each underlying content ID to confirm it exists. If ContentInfo fails for any content ID, the error is wrapped with 'error getting content info for <contentID>'. It indicates that a piece of the object cannot be found or read metadata for in the content-addressable store.","triggerScenarios":"Calling VerifyObject on an object whose backing content was deleted by garbage collection, or when the content manager cannot read content info due to backend errors or corruption.","commonSituations":"Post-GC dangling indirect objects, corrupted content-index blobs in the repository, storage backend failures during verification audits.","solutions":["Run repository consistency checks/garbage collection audit and restore the missing content from backup.","Check storage backend health and connectivity, then re-run VerifyObject.","Re-create the object from its source if the backing content is unrecoverable.","Exclude unverifiable objects from restore/concatenation operations until repaired."],"exampleFix":"// before: trusting the object exists\nids, err := object.VerifyObject(ctx, cr, oid)\n\n// after: handle missing content distinctly\nids, err := object.VerifyObject(ctx, cr, oid)\nif err != nil {\n    return fmt.Errorf(\"object %v has missing backing content: %w\", oid, err)\n}","handlingStrategy":"try-catch","validationCode":"func objectIntact(ctx context.Context, cr contentReader, oid ID) error {\n    _, err := VerifyObject(ctx, cr, oid)\n    return err\n}","typeGuard":null,"tryCatchPattern":"ids, err := VerifyObject(ctx, cr, oid)\nif err != nil {\n    if errors.Is(err, content.ErrContentNotFound) { return ErrObjectIncomplete }\n    return fmt.Errorf(\"verify %v: %w\", oid, err)\n}","preventionTips":["Run VerifyObject after GC before restores","Keep content-info checks in maintenance jobs","Alert on verification failures to catch bit-rot early"],"tags":["verification","content-addressable","object-storage"],"backgroundTag":"resource-not-found","analyzedSha":"82495e54b584c1ef6073c9e1be048f57f8aef078","analyzedAt":"2026-09-07T20:35:21.689Z","contentChangedAt":"2026-09-07T20:35:21.689Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}