Add error handling to get_userids.