fuchanghai commented on code in PR #15258:
URL:
https://github.com/apache/dolphinscheduler/pull/15258#discussion_r1416572709
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/exceptions/ApiExceptionHandler.java:
##########
@@ -36,12 +38,14 @@
public class ApiExceptionHandler {
@ExceptionHandler(ServiceException.class)
+ @ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR)
public Result<Object> exceptionHandler(ServiceException e, HandlerMethod
hm) {
log.error("{} Meet a ServiceException: {}", hm.getShortLogMessage(),
e.getMessage());
return new Result<>(e.getCode(), e.getMessage());
}
@ExceptionHandler(Throwable.class)
+ @ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR)
Review Comment:
hi @caishunfeng The scenario I am using now is as follows: I added a new
process definition in ds. This process definition has an http node and calls
the native interface of ds. Although this interface reports an error, the http
status code of this interface is 200, so The status displayed by the process
instance is Successful. I think this is not very reasonable. Based on the above
problems, I thought of modifying this return status code.
--
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]