diff --git a/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/DorisStreamLoad.java b/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/DorisStreamLoad.java index 44ff573e7..02c2df494 100644 --- a/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/DorisStreamLoad.java +++ b/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/DorisStreamLoad.java @@ -268,7 +268,14 @@ public RespContent handlePreCommitResponse(CloseableHttpResponse response) throw if (statusCode == 200 && response.getEntity() != null) { String loadResult = EntityUtils.toString(response.getEntity()); LOG.info("load Result {}", loadResult); - return OBJECT_MAPPER.readValue(loadResult, RespContent.class); + RespContent respContent = OBJECT_MAPPER.readValue(loadResult, RespContent.class); + if (respContent == null + || respContent.getLabel() == null + || respContent.getTxnId() == null) { + throw new DorisRuntimeException("Response error : " + loadResult); + } else { + return respContent; + } } throw new StreamLoadException("stream load error: " + response.getStatusLine().toString()); }