Updating assertion to avoid error when status is undefined