gjohnson/consul-node — pull request #4 by chrisDeFouRire (2014-06-23 16:30:49+00:00)
Title: Better error handling in case of Consul failure

I've stumbled upon a problem with the current NPM version, where I couldn't resume from a Consul failure because the error was thrown instead of called-back. It appears it's already fixed in master, but here's a suggestion, to return more information...

Here's an example:

{ [Error: socket hang up] code: 'ECONNRESET' }
{ [Error: Consul Error] code: 500, body: 'No cluster leader' }

I've also added module 'debug' as a dependency in package.json as it's required.