Update the state element with error problem.