aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/music/rest
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/onap/music/rest')
-rwxr-xr-xsrc/main/java/org/onap/music/rest/RestMusicAdminAPI.java14
-rwxr-xr-xsrc/main/java/org/onap/music/rest/RestMusicDataAPI.java7
2 files changed, 16 insertions, 5 deletions
diff --git a/src/main/java/org/onap/music/rest/RestMusicAdminAPI.java b/src/main/java/org/onap/music/rest/RestMusicAdminAPI.java
index 849c3a98..cbe9ec9c 100755
--- a/src/main/java/org/onap/music/rest/RestMusicAdminAPI.java
+++ b/src/main/java/org/onap/music/rest/RestMusicAdminAPI.java
@@ -167,8 +167,14 @@ public class RestMusicAdminAPI {
Row row = (Row) it.next();
resultMap.put( row.getUUID("uuid").toString(),row.getString("keyspace_name"));
}
- if (resultMap.isEmpty())
- resultMap.put("ERROR", "Application is not onboarded. Please contact admin.");
+ if (resultMap.isEmpty()) {
+ if(uuid != null)
+ resultMap.put("Exception", "Please make sure Aid is correct and application is onboarded.");
+ else {
+ resultMap.put("Exception",
+ "Application is not onboarded. Please make sure all the information is correct.");
+ }
+ }
return resultMap;
}
@@ -212,7 +218,7 @@ public class RestMusicAdminAPI {
resultMap.put("Success", "Your application has been deleted successfully");
} else {
resultMap.put("Exception",
- "Oops. Spomething went wrong. Please make sure Aid is correct or Application is onboarded");
+ "Oops. Something went wrong. Please make sure Aid is correct or Application is onboarded");
}
return resultMap;
}
@@ -329,7 +335,7 @@ public class RestMusicAdminAPI {
resultMap.put("Success", "Your application has been updated successfully");
} else {
resultMap.put("Exception",
- "Oops. Spomething went wrong. Please make sure Aid is correct and application is onboarded");
+ "Oops. Something went wrong. Please make sure Aid is correct and application is onboarded");
}
return resultMap;
diff --git a/src/main/java/org/onap/music/rest/RestMusicDataAPI.java b/src/main/java/org/onap/music/rest/RestMusicDataAPI.java
index ed586d06..e7af8f9f 100755
--- a/src/main/java/org/onap/music/rest/RestMusicDataAPI.java
+++ b/src/main/java/org/onap/music/rest/RestMusicDataAPI.java
@@ -181,7 +181,12 @@ public class RestMusicDataAPI {
boolean result = false;
long start = System.currentTimeMillis();
Map<String, Object> replicationInfo = kspObject.getReplicationInfo();
- String repString = "{" + MusicUtil.jsonMaptoSqlString(replicationInfo, ",") + "}";
+ String repString = null;
+ try {
+ repString = "{" + MusicUtil.jsonMaptoSqlString(replicationInfo, ",") + "}";
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, e.getMessage());
+ }
queryObject.appendQueryString(
"CREATE KEYSPACE " + keyspaceName + " WITH replication = " + repString);
if (kspObject.getDurabilityOfWrites() != null) {