aboutsummaryrefslogtreecommitdiffstats
path: root/champ-service/src
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 /champ-service/src
parent342dbc8a4af828aa7e918138dc693b9d4f85c2a0 (diff)
parent7c449cf6a2596db7d0cd8a57145b5198be551559 (diff)
Merge "Catch IllegalArgumentException for error message"
Diffstat (limited to 'champ-service/src')
-rw-r--r--champ-service/src/main/java/org/onap/champ/ChampRESTAPI.java8
1 files changed, 8 insertions, 0 deletions
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);