xiaochen-zhou commented on code in PR #10696:
URL: https://github.com/apache/seatunnel/pull/10696#discussion_r3028313820


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/filter/ExceptionHandlingFilter.java:
##########
@@ -64,7 +65,7 @@ private void handleException(int status, HttpServletResponse 
response, Exception
         response.setContentType("application/json;charset=UTF-8");
 
         ErrResponse errorResponse = new ErrResponse();
-        errorResponse.setMessage(e.getMessage());
+        errorResponse.setMessage(ExceptionUtils.getStackTrace(e));

Review Comment:
   > I’m not sure we should return the full stack trace in the REST response. 
Since `log.error(..., e)` already records the full exception in the server 
logs, would it be better to keep only `e.getMessage()` here?
   
   Sometimes the task returns incomplete information, making it impossible to 
determine the specific error details. For example:
   ```
   org.apache.seatunnel.api.table.factory.FactoryException: ErrorCode:[API-06], 
ErrorDescription:[Factory initialize failed] - Unable to create a source for 
identifier 'HdfsFile'.
   ```
   
   The exact error information is unclear.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to