From f129f24bd74ad7692bd345399fb9f40aa033af9f Mon Sep 17 00:00:00 2001 From: Peter Rabbitson Date: Fri, 27 Mar 2020 07:57:31 +0100 Subject: [PATCH] Bring back error-prettifyer removed in f6b707d85f4 --- core/commands/dag/dag.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/commands/dag/dag.go b/core/commands/dag/dag.go index 4eb2283b5..08981c24f 100644 --- a/core/commands/dag/dag.go +++ b/core/commands/dag/dag.go @@ -332,6 +332,15 @@ The output of blocks happens in strict DAG-traversal, first-seen, order. return err } - return <-errCh + err = <-errCh + + // minimal user friendliness + if err != nil && + !node.IsOnline && + err.Error() == "merkledag: not found" { + err = fmt.Errorf("%s (currently offline, perhaps retry after attaching to the network)", err) + } + + return err }, }