Improve error handling in get_updates().