deal with error code msg