add on_error handler to librato metrics reporter