Catch IllegalArgumentException for error message 27/38627/3
authorDaniel Silverthorn <daniel.silverthorn@amdocs.com>
Mon, 26 Mar 2018 17:58:14 +0000 (13:58 -0400)
committerDaniel Silverthorn <daniel.silverthorn@amdocs.com>
Wed, 28 Mar 2018 13:16:45 +0000 (09:16 -0400)
Also had to upversion event client library

Change-Id: I4dbbf8f35630d93cca9e5d8971e7fde8a65b0811
Issue-ID: AAI-945
Signed-off-by: Daniel Silverthorn <daniel.silverthorn@amdocs.com>
champ-lib/pom.xml
champ-service/pom.xml
champ-service/src/main/java/org/onap/champ/ChampRESTAPI.java

index 7f98c25..5e441e0 100644 (file)
@@ -15,7 +15,7 @@
 
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <event.client.version>1.2.0</event.client.version>
+        <event.client.version>1.2.1</event.client.version>
 
         <!--<absoluteDistFilesRoot>/appl/${project.artifactId}</absoluteDistFilesRoot>-->
 
index 25500c3..c5c90f4 100644 (file)
@@ -28,7 +28,7 @@
         <distFilesRoot>/appl/${project.artifactId}/${project.version}</distFilesRoot>
 
         <common.logging.groupid>org.onap.aai.logging-service</common.logging.groupid>
-        <common.logging.version>1.2.0</common.logging.version>
+        <common.logging.version>1.2.2</common.logging.version>
         <org.apache.httpcomponents.httpclient.version>4.5.2</org.apache.httpcomponents.httpclient.version>
     </properties>
 
index e9a2830..577dbc9 100644 (file)
@@ -205,6 +205,8 @@ public class ChampRESTAPI {
       response = Response.status(Status.BAD_REQUEST).entity("Unable to parse the payload").build();
     } catch (ChampServiceException ce) {
       response = Response.status(ce.getHttpStatus()).entity(ce.getMessage()).build();
+    } catch (IllegalArgumentException e) {
+      response = Response.status(Status.BAD_REQUEST).entity(e.getMessage()).build();
     } catch (Exception e) {
       response = Response.status(Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).build();
       LoggingUtil.logInternalError(logger, e);
@@ -243,6 +245,8 @@ public class ChampRESTAPI {
       response = Response.status(Status.BAD_REQUEST).entity("Unable to parse the payload").build();
     } catch (ChampServiceException ce) {
       response = Response.status(ce.getHttpStatus()).entity(ce.getMessage()).build();
+    } catch (IllegalArgumentException e) {
+      response = Response.status(Status.BAD_REQUEST).entity(e.getMessage()).build();
     } catch (Exception e) {
       response = Response.status(Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).build();
       LoggingUtil.logInternalError(logger, e);
@@ -387,6 +391,8 @@ public class ChampRESTAPI {
       response = Response.status(Status.BAD_REQUEST).entity("Unable to parse the payload").build();
     } catch (ChampServiceException ce) {
       response = Response.status(ce.getHttpStatus()).entity(ce.getMessage()).build();
+    } catch (IllegalArgumentException e) {
+      response = Response.status(Status.BAD_REQUEST).entity(e.getMessage()).build();
     } catch (Exception e) {
       response = Response.status(Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).build();
       LoggingUtil.logInternalError(logger, e);
@@ -423,6 +429,8 @@ public class ChampRESTAPI {
       response = Response.status(Status.BAD_REQUEST).entity("Unable to parse the payload").build();
     } catch (ChampServiceException ce) {
       response = Response.status(ce.getHttpStatus()).entity(ce.getMessage()).build();
+    } catch (IllegalArgumentException e) {
+      response = Response.status(Status.BAD_REQUEST).entity(e.getMessage()).build();
     } catch (Exception e) {
       response = Response.status(Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).build();
       LoggingUtil.logInternalError(logger, e);