show error message if state change is unsuccessful