Check error.type globally and change to name.