Logged error message in RestMusicAdminAPI 59/73559/3
authorezhil <ezhrajam@in.ibm.com>
Mon, 26 Nov 2018 17:50:14 +0000 (23:20 +0530)
committerBrendan Tschaen <ctschaen@att.com>
Tue, 27 Nov 2018 16:27:15 +0000 (16:27 +0000)
Fixed Sonar issue in RestMusicAdminAPI
Issue-ID: MUSIC-202
Change-Id: I49cf54168b3cc24e77cbb14078e147c7a4972834
Signed-off-by: ezhil <ezhrajam@in.ibm.com>
src/main/java/org/onap/music/rest/RestMusicAdminAPI.java

index 33128f3..7fb7b1d 100755 (executable)
@@ -4,6 +4,8 @@
  * ===================================================================
  *  Copyright (c) 2017 AT&T Intellectual Property
  * ===================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
  *  You may obtain a copy of the License at
@@ -939,7 +941,7 @@ public class RestMusicAdminAPI {
                pQuery.addValue(MusicUtil.convertToActualDataType(DataType.text(), notifyOn));
                MusicCore.nonKeyRelatedPut(pQuery, MusicUtil.EVENTUAL);
         } catch(Exception e) {
-               e.printStackTrace();
+               logger.error(EELFLoggerDelegate.errorLogger,e.getMessage());
                return response.status(Status.BAD_REQUEST).entity(new JsonResponse(ResultType.FAILURE).setMessage("Callback api registration failed").toMap()).build();
         }
        return response.status(Status.OK).entity(new JsonResponse(ResultType.SUCCESS).setMessage("Callback api successfully deleted").toMap()).build();