Improve CPS Exception handling
[cps.git] / cps-service / src / main / java / org / onap / cps / spi / exceptions / DataspaceNotFoundException.java
@@ -17,7 +17,7 @@
  *  ============LICENSE_END=========================================================
  */
 
-package org.onap.cps.exceptions;
+package org.onap.cps.spi.exceptions;
 
 
 /**
@@ -30,28 +30,10 @@ public class DataspaceNotFoundException extends CpsAdminException {
     /**
      * Constructor.
      *
-     * @param cause the cause of the exception
+     * @param dataspaceName the name of the dataspace
      */
-    public DataspaceNotFoundException(final Throwable cause) {
-        super(cause.getMessage(), cause);
-    }
 
-    /**
-     * Constructor.
-     *
-     * @param message the error message
-     * @param cause   the cause of the exception
-     */
-    public DataspaceNotFoundException(final String message, final Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Constructor.
-     *
-     * @param details the error details
-     */
-    public DataspaceNotFoundException(final String details) {
-        super("Dataspace Not Found", details);
+    public DataspaceNotFoundException(final String dataspaceName) {
+        super("Dataspace not found", String.format("Dataspace with name %s does not exist.", dataspaceName));
     }
 }