bharatviswa504 commented on a change in pull request #2267:
URL: https://github.com/apache/ozone/pull/2267#discussion_r636686401



##########
File path: 
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineNotFoundException.java
##########
@@ -18,18 +18,18 @@
 
 package org.apache.hadoop.hdds.scm.pipeline;
 
-import java.io.IOException;
+import org.apache.hadoop.hdds.scm.exceptions.SCMException;
 
 /**
  * Signals that a pipeline is missing from PipelineManager.
  */
-public class PipelineNotFoundException extends IOException{
+public class PipelineNotFoundException extends SCMException {
   /**
    * Constructs an {@code PipelineNotFoundException} with {@code null}
    * as its error detail message.
    */
   public PipelineNotFoundException() {
-    super();
+    super(ResultCodes.PIPELINE_NOT_FOUND);

Review comment:
       Yes. I believe the ResultCodes in proto will help when we want to return 
ResultCodes in Response and construct the Exception based on that.
   
   I believe when Rpc Layer constructs this Exception it used IOException 
default constructor and the ResultCode will be lost, and the message will be 
present.




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

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