2011shenlin commented on code in PR #36:
URL: 
https://github.com/apache/rocketmq-eventbridge/pull/36#discussion_r998873415


##########
domain/src/main/java/org/apache/rocketmq/eventbridge/domain/model/apidestination/ApiDestinationService.java:
##########
@@ -57,7 +58,11 @@ public String createApiDestination(ApiDestinationDTO 
eventApiDestinationDTO) {
             return null;
         } catch (Exception e) {
             log.error("ApiDestinationService | createApiDestination | error", 
e);
-            throw new EventBridgeException(e);
+            if (e instanceof EventBridgeException) {
+                EventBridgeException eventBridgeException = 
(EventBridgeException)e;
+                throw new EventBridgeException(eventBridgeException.getCode(), 
eventBridgeException.getMessage());

Review Comment:
   Move to Exception Handler, remove the exception catch and. duplicate invalid 
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]

Reply via email to