caishunfeng commented on code in PR #15258:
URL:
https://github.com/apache/dolphinscheduler/pull/15258#discussion_r1416552574
##########
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:
I think the original intention of this exception handler was to prevent
throwing server unknown exception.
So is it necessary to change this response status?
BTW, this change will also affect the call retrun of openapi.
--
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]