chovy-3012 commented on code in PR #11836:
URL: https://github.com/apache/doris/pull/11836#discussion_r948884679


##########
fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java:
##########
@@ -164,6 +164,13 @@ private void auditAfterExec(String origStmt, StatementBase 
parsedStmt, Data.PQue
                 .setQueryId(ctx.queryId() == null ? "NaN" : 
DebugUtil.printId(ctx.queryId()))
                 .setTraceId(spanContext.isValid() ? spanContext.getTraceId() : 
"");
 
+        // audit error msg
+        if (ctx.getState().getStateType() == MysqlStateType.ERR) {
+            
ctx.getAuditEventBuilder().setErrType(ctx.getState().getErrType().name())
+                .setErrCode(ctx.getState().getErrorCode().name())

Review Comment:
   Yes, this case may happed and cause null point exception in 
`ctx.getState().getErrorXXX().name()`.
   Do you suggest adding a empty/null value judgment ?
   



-- 
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