morningman commented on code in PR #44292:
URL: https://github.com/apache/doris/pull/44292#discussion_r1851521263


##########
fe/fe-core/src/main/java/org/apache/doris/job/extensions/insert/InsertTask.java:
##########
@@ -195,10 +196,13 @@ public void run() throws JobException {
                 return;
             }
             command.runWithUpdateInfo(ctx, stmtExecutor, loadStatistic);
+            if (ctx.getState().getStateType() != QueryState.MysqlStateType.OK) 
{
+                throw new JobException(ctx.getState().getErrorMessage());
+            }
         } catch (Exception e) {
             log.warn("execute insert task error, job id is {}, task id is 
{},sql is {}", getJobId(),
                     getTaskId(), sql, e);
-            throw new JobException(e);
+            throw new JobException(e.getMessage());

Review Comment:
   We can use `Util.getRootCauseMessage()` to get the root cause, for better 
debug



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to