Merge pull request #1788 from chenhaoyus/master

fix: 解决sftp服务器连接失败未抛出异常,导致后续获取ChannelSft出现nullPointerException
This commit is contained in:
dingxiaobo 2023-08-21 17:07:25 +08:00 committed by GitHub
commit fa123778cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,6 +64,8 @@ public class SftpHelper extends FtpHelper {
String message = String.format("请确认连接ftp服务器端口是否正确错误的端口: [%s] ", port);
LOG.error(message);
throw DataXException.asDataXException(FtpReaderErrorCode.FAIL_LOGIN, message, e);
}else{
throw DataXException.asDataXException(FtpReaderErrorCode.COMMAND_FTP_IO_EXCEPTION, "", e);
}
}else {
if("Auth fail".equals(e.getMessage())){