aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Blimkie <Steven.Blimkie@amdocs.com>2018-03-28 14:14:51 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-28 14:14:51 +0000
commit533b090aa92f5eaa6c674fd63940fcacf4dc811e (patch)
tree61a54ddde8277f182896e1ba0c3280e808819376
parent342dbc8a4af828aa7e918138dc693b9d4f85c2a0 (diff)
parent7c449cf6a2596db7d0cd8a57145b5198be551559 (diff)
Merge "Catch IllegalArgumentException for error message"
-rw-r--r--champ-lib/pom.xml2
-rw-r--r--champ-service/pom.xml2
-rw-r--r--champ-service/src/main/java/org/onap/champ/ChampRESTAPI.java8
3 files changed, 10 insertions, 2 deletions
diff --git a/champ-lib/pom.xml b/champ-lib/pom.xml
index 921e733..43fa296 100644
--- a/champ-lib/pom.xml
+++ b/champ-lib/pom.xml
@@ -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>-->
diff --git a/champ-service/pom.xml b/champ-service/pom.xml
index 2168783..b0dbf46 100644
--- a/champ-service/pom.xml
+++ b/champ-service/pom.xml
@@ -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>
diff --git a/champ-service/src/main/java/org/onap/champ/ChampRESTAPI.java b/champ-service/src/main/java/org/onap/champ/ChampRESTAPI.java
index 08b602a..b75ba53 100644
--- a/champ-service/src/main/java/org/onap/champ/ChampRESTAPI.java
+++ b/champ-service/src/main/java/org/onap/champ/ChampRESTAPI.java
@@ -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);