yzhao244 commented on a change in pull request #434:
URL: 
https://github.com/apache/incubator-eventmesh/pull/434#discussion_r671396893



##########
File path: 
eventmesh-store-api/src/main/java/org/apache/eventmesh/store/api/openschema/common/ServiceException.java
##########
@@ -0,0 +1,50 @@
+package org.apache.eventmesh.store.api.openschema.common;
+
+
+import org.apache.eventmesh.store.api.openschema.response.ErrorResponse;
+
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ServiceException extends Exception {
+      private static final long serialVersionUID = 1L;
+      
+         private int errorCode;
+         private String errorMessage;
+
+         //public ErrorResponse(@JsonProperty("error_code") int errorCode,
+         //                     @JsonProperty("error_message") String 
errorMessage) {
+         public ServiceException(ServiceError serviceError) {            
+               super(serviceError.getMessage());
+           this.errorCode = serviceError.getErrorCode();
+           this.errorMessage = serviceError.getMessage();
+         }
+
+         @JsonProperty("error_code")
+         public int getErrorCode() {
+           return errorCode;
+         }
+
+         @JsonProperty("error_code")
+         public void setErrorCode(int error_code) {

Review comment:
       fixed




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to