js-libp2p icon indicating copy to clipboard operation
js-libp2p copied to clipboard

make actionable error messaging when DHT not enabled

Open jacobheun opened this issue 6 years ago • 1 comments

If no content/peer router is running, such as the DHT, and a user attempts to make a content or peer routing request the error is not particularly helpful as detailed at https://github.com/libp2p/js-libp2p/issues/314#issuecomment-458802548.

For errors like this, where the system needs to be added/started via configuration, we should add an actionable message to the error to allow the user to better fix the problem. In the error linked above, this could be a link to the DHT configuration section of the readme.

cc: @vasco-santos

jacobheun avatar Feb 05 '19 14:02 jacobheun

Having a reference to the README seems a cool idea!

vasco-santos avatar Feb 07 '19 11:02 vasco-santos

Closing as this is no longer relevant, we now return a more informative error

maschad avatar Sep 28 '23 20:09 maschad