diff --git a/core/commands/dag/dag.go b/core/commands/dag/dag.go index 7d21eb0710f..41fde70e506 100644 --- a/core/commands/dag/dag.go +++ b/core/commands/dag/dag.go @@ -237,7 +237,7 @@ Specification of CAR formats: https://ipld.io/specs/transport/car/ } if event.Root.PinErrorMsg != "" { - event.Root.PinErrorMsg = fmt.Sprintf("FAILED: %s", event.Root.PinErrorMsg) + return fmt.Errorf("pinning root %q FAILED: %s", enc.Encode(event.Root.Cid), event.Root.PinErrorMsg) } else { event.Root.PinErrorMsg = "success" }