Go-ipfs: error message when the daemon is down could be more informative

Created on 26 Nov 2015  路  8Comments  路  Source: ipfs/go-ipfs

I forgot to launch the daemon a machine B, and added a file on machine A.

On machine B when I tried to ipfs cat [dag] the error message I got was merkledag: not found; it could be more informative (at least: "check that your local daemon is running")

neetriage topiapi topicommands topidocs-ipfs

Most helpful comment

merkledag: not found message is very cryptic to everyone that encounters it the first time. I think the error should hint that the daemon is not running, or at the very least cid not found locally.

All 8 comments

Running the daemon doesn't guarantee you will get the file from machine A. If daemon B is up but with 0 peers (as in not connected to the network), you'd still get the same err message.

yeah probably should make the errors more informative

They should also conform. For instance:

> ipfs bitswap wantlist
Error: api not running

This should have the same error message as ipfs get and ipfs cat, which both return Error: merkledag: not found.

If the daemon isn't running locally the ipfs cat command could return a helpful reminder to start the daemon.

"[...] Please make sure that the daemon is running. The daemon can be started with ipfs daemon."

These are different issues. Running ipfs commands without a daemon is a perfectly valid usecase. In those instances, trying to access an object you don't have in your local repo should correctly respond with "not found".

@RichardLitt ipfs bitswap wantlist and ipfs get/cat are two very different types of commands. It doesnt make sense for them to have the same output.

@karlek imagine the scenario where you are working with ipfs offline on purpose, The error message you propose wouldn't really fit.

merkledag: not found message is very cryptic to everyone that encounters it the first time. I think the error should hint that the daemon is not running, or at the very least cid not found locally.

Throwing in my voice: the only reason I found out what this error means is I googled it and got this ticket.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Mikaela picture Mikaela  路  3Comments

slrslr picture slrslr  路  3Comments

jonchoi picture jonchoi  路  3Comments

lidel picture lidel  路  3Comments

whyrusleeping picture whyrusleeping  路  4Comments