stianeikeland / node-etcd

:satellite: Etcd client for nodejs
BSD 3-Clause "New" or "Revised" License
259 stars 85 forks source link

No error message with invalid URL #79

Open ghost opened 7 years ago

ghost commented 7 years ago

If I initialize the client with a bogus url - http:localhost:4001 instead of http://localhost:4001 - the library gives me absolutely NO indication that there is anything wrong. No connection failure. No url parse failure. No host lookup failure. No error message in callbacks. All of my get and set methods simply never have their callback called at all. This is a totally blocking error that deserves to have some pretty significant logging and error notification happening. To just silently swallow the error and leave no clue as to what went wrong is about the least reasonable response - and one that likely wastes huge quantities of developer time cumulatively across all users of this library. I highly doubt I'm the first person to fat-finger a URL.

Additionally, the docs say that the Etcd() constructor will 'callback with an error' if it exhausts all URLs when attempting to connect - but according to the docs, the Etcd() constructor doesn't take a callback.

roccomuso commented 6 years ago

I Agree. It doesn't have a callback, neither emits an error event.