caishunfeng commented on code in PR #15258:
URL: 
https://github.com/apache/dolphinscheduler/pull/15258#discussion_r1416539907


##########
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/AlertGroupControllerTest.java:
##########
@@ -210,7 +210,7 @@ public void test090DelAlertGroupById() throws Exception {
         MvcResult mvcResult = mockMvc.perform(delete("/alert-groups/1")
                 .header("sessionId", sessionId)
                 .params(paramsMap))
-                .andExpect(status().isOk())
+                .andExpect(status().isInternalServerError())

Review Comment:
   This test case seems not good, why `test080DelAlertGroupById` is successful 
but `test090DelAlertGroupById` throws a exception?



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

Review Comment:
   I don't think we should add this anno for `ServiceException` because it's a 
business exception that is actively thrown as expected. WDYT?



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