didit-tech/FastLegS — pull request #35 by pvencill (2012-04-19 18:16:26+00:00)
Title: properly surface pg connection errors

Currently, the FastLegS client does not properly handle the pg modules .on('error') emission, which results in a uncaughtException being thrown to the process if there's any burp in the DB connection.

This patch adds an on('error') listener that records the error and surfaces it to the client's query callback as an error so the app can recover gracefully.