From 587e3d75c651f97b6e11cc61d7159e607c3f0f90 Mon Sep 17 00:00:00 2001 From: "Vikram Potturi(apotturi)" Date: Mon, 9 Apr 2018 16:47:50 -0400 Subject: Adding HEAT map information. Change-Id: I676137f72ab3cf451532c8f8fcfd032f83c31d5b Issue-ID: MUSIC-63 Signed-off-by: Vikram Potturi(apotturi) --- src/main/java/org/onap/music/rest/RestMusicLocksAPI.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/java/org/onap/music/rest/RestMusicLocksAPI.java') diff --git a/src/main/java/org/onap/music/rest/RestMusicLocksAPI.java b/src/main/java/org/onap/music/rest/RestMusicLocksAPI.java index 9189fbb3..22112ddf 100644 --- a/src/main/java/org/onap/music/rest/RestMusicLocksAPI.java +++ b/src/main/java/org/onap/music/rest/RestMusicLocksAPI.java @@ -412,7 +412,11 @@ public class RestMusicLocksAPI { logger.error(EELFLoggerDelegate.errorLogger,"", AppMessages.UNKNOWNERROR ,ErrorSeverity.CRITICAL, ErrorTypes.GENERALSERVICEERROR); return response.status(Status.BAD_REQUEST).entity(resultMap).build(); } - MusicCore.deleteLock(lockName); + try{ + MusicCore.deleteLock(lockName); + }catch (Exception e) { + return response.status(Status.BAD_REQUEST).entity(new JsonResponse(ResultType.FAILURE).setError(e.getMessage()).toMap()).build(); + } return response.status(Status.OK).entity(new JsonResponse(ResultType.SUCCESS).toMap()).build(); } -- cgit 1.2.3-korg