{"record":{"id":"cba884bfe72e4d9a","repo":"ipfs/kubo","slug":"pinning-root-q-failed-s","errorCode":null,"errorMessage":"pinning root %q FAILED: %s","messagePattern":"pinning root %q FAILED: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/commands/dag/dag.go","lineNumber":261,"sourceCode":"\t\t\t\t}\n\t\t\t\tstats, _ := req.Options[statsOptionName].(bool)\n\t\t\t\tif stats {\n\t\t\t\t\tfmt.Fprintf(w, \"Imported %d blocks (%d bytes)\\n\", event.Stats.BlockCount, event.Stats.BlockBytesCount)\n\t\t\t\t}\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\tif event.Stats != nil {\n\t\t\t\treturn fmt.Errorf(\"unexpected message from DAG import\")\n\t\t\t}\n\n\t\t\tenc, err := cmdenv.GetCidEncoder(req)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tif event.Root.PinErrorMsg != \"\" {\n\t\t\t\treturn fmt.Errorf(\"pinning root %q FAILED: %s\", enc.Encode(event.Root.Cid), event.Root.PinErrorMsg)\n\t\t\t}\n\n\t\t\tevent.Root.PinErrorMsg = \"success\"\n\n\t\t\t_, err = fmt.Fprintf(\n\t\t\t\tw,\n\t\t\t\t\"Pinned root\\t%s\\t%s\\n\",\n\t\t\t\tenc.Encode(event.Root.Cid),\n\t\t\t\tevent.Root.PinErrorMsg,\n\t\t\t)\n\t\t\treturn err\n\t\t}),\n\t},\n}\n\n// DagExportCmd is a command for exporting an ipfs dag to a car\nvar DagExportCmd = &cmds.Command{\n\tHelptext: cmds.HelpText{","sourceCodeStart":243,"sourceCodeEnd":279,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/commands/dag/dag.go#L243-L279","documentation":"'ipfs dag import' imported the blocks but failed to pin the DAG root: the wrapped PinErrorMsg comes from the pinning step (e.g. pin already exists under a different recursive pin, or a datastore write failure). %q is the root CID; the data is in the blockstore but not pinned as requested.","triggerScenarios":"Thrown at core/commands/dag/dag.go:261 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the embedded PinErrorMsg for the specific pin failure","Manually pin the root afterwards with 'ipfs pin add' once the cause is resolved","Free space or repair the datastore if the embedded error is storage-related"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}