Extract errorText to a variable that can be reused