gjohnson / consul-node

A node.js client library for consul.
MIT License
67 stars 16 forks source link

Better error handling in case of Consul failure #4

Closed chrisDeFouRire closed 10 years ago

chrisDeFouRire commented 10 years ago

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.

gjohnson commented 10 years ago

Cool. Please remove the package version update (I'll do that for a release) and also pin the debug version to that exact version instead of that relative ^ stuff.

chrisDeFouRire commented 10 years ago

revert package version, and pin version number of debug : done

gjohnson commented 10 years ago

Thanks!