cambyzju commented on code in PR #11836:
URL: https://github.com/apache/doris/pull/11836#discussion_r948607620


##########
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:
   In the following two cases, ErrType, ErrCode and ErrMsg will be empty or 
other values? 
   1. if we got MysqlStateType.ERR, but getState().getErrorCode() not set;
   2. the error code returned by getState().getErrorCode() not registered;



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