js-ipfsd-ctl
js-ipfsd-ctl copied to clipboard
Need to trap JSON.parse and emit more informative error on parse failure
https://github.com/ipfs/ipfs-desktop/issues/2004 and https://github.com/ipfs/ipfs-desktop/issues/2000 show that a JSON parse error happened, which points to https://github.com/ipfs/js-ipfsd-ctl/blob/70dff97afc5a194afc106b817b98575f8b122723/src/ipfsd-daemon.js#L366
we should wrap the json.parse in a try/catch and provide a more informative error message:
- What is the value of
stdout
- What is the value of
key