[chore](query err) fix cutting err msg incorrectly #41456 (#41538)

cherry pick from #41456
This commit is contained in:
yujun
2024-10-08 16:09:15 +08:00
committed by GitHub
parent 3355ebe5e7
commit ca59c8537c

View File

@ -1427,15 +1427,6 @@ public class Coordinator implements CoordInterface {
} else {
String errMsg = copyStatus.getErrorMsg();
LOG.warn("query failed: {}", errMsg);
// hide host info exclude localhost
if (errMsg.contains("localhost")) {
throw new UserException(errMsg);
}
int hostIndex = errMsg.indexOf("host");
if (hostIndex != -1) {
errMsg = errMsg.substring(0, hostIndex);
}
throw new UserException(errMsg);
}
}