@cryptotaxi247 / kubo / commits / f129f24bd

Bring back error-prettifyer removed in f6b707d85f4

Peter Rabbitson committed Mar 27, 2020 at 07:57 UTC f129f24bd74ad7692bd345399fb9f40aa033af9f
1 file changed +10 -1
core/commands/dag/dag.go
+10 -1
@@ -332,6 +332,15 @@ The output of blocks happens in strict DAG-traversal, first-seen, order.
332 return err
333 }
334
335 - return <-errCh
335 + err = <-errCh
336 +
337 + // minimal user friendliness
338 + if err != nil &&
339 + !node.IsOnline &&
340 + err.Error() == "merkledag: not found" {
341 + err = fmt.Errorf("%s (currently offline, perhaps retry after attaching to the network)", err)
342 + }
343 +
344 + return err
345 },
346 }