trim the white-space of the error messages.