capture socket errors in newrelic endpoint