deal with error message