Fix error handling in ping_newrelic