Error handling in poller loop