Added optional callback to handle errors

Required to be able to cleanly end outstanding requests in Node if an underlying service barfs.

The change relies on a new, optional fourth parameter and shouldn't break anything at all.