Bring back error-prettifyer removed in f6b707d85f

This commit is contained in:
Peter Rabbitson 2020-03-27 07:57:31 +01:00 committed by Steven Allen
parent 3dca025f05
commit f129f24bd7

View File

@ -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
},
}