wolfboys commented on code in PR #1852:
URL: 
https://github.com/apache/incubator-streampark/pull/1852#discussion_r996559461


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/controller/VariableController.java:
##########
@@ -87,6 +92,11 @@ public RestResponse deleteVariables(@Valid Variable 
variable) throws Exception {
 
     @PostMapping("check/code")
     public RestResponse checkVariableCode(@RequestParam Long teamId, 
@NotBlank(message = "{required}") String variableCode) {
+        try {
+            this.checkVariableCodeFormat(variableCode);
+        } catch (ApiAlertException e) {
+            return RestResponse.fail(e.getMessage(), 
ResponseCode.CODE_FAIL_ALERT);

Review Comment:
   we don't need try exception there, just `throw exception`



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