Merge "Catch IllegalArgumentException for error message"
authorSteven Blimkie <Steven.Blimkie@amdocs.com>
Wed, 28 Mar 2018 14:14:51 +0000 (14:14 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 28 Mar 2018 14:14:51 +0000 (14:14 +0000)
champ-lib/pom.xml
champ-service/pom.xml
champ-service/src/main/java/org/onap/champ/ChampRESTAPI.java

index 921e733..43fa296 100644 (file)
@@ -41,7 +41,7 @@ limitations under the License.
 
     <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 2168783..b0dbf46 100644 (file)
@@ -48,7 +48,7 @@ limitations under the License.
         <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>
 
         <docker.location>${basedir}/target</docker.location>
index 08b602a..b75ba53 100644 (file)
@@ -204,6 +204,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);
@@ -242,6 +244,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);
@@ -386,6 +390,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);
@@ -422,6 +428,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);