X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=champ-service%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fchamp%2FChampRESTAPI.java;fp=champ-service%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fchamp%2FChampRESTAPI.java;h=577dbc98d36a7d42f6e459deb93826c69705e873;hb=7c449cf6a2596db7d0cd8a57145b5198be551559;hp=e9a2830c7ce9e518e9ecad07ffcb3206774892e2;hpb=84cdd4d4e354e856bf265c36d4953367cb9a1bd7;p=aai%2Fchamp.git 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 e9a2830..577dbc9 100644 --- a/champ-service/src/main/java/org/onap/champ/ChampRESTAPI.java +++ b/champ-service/src/main/java/org/onap/champ/ChampRESTAPI.java @@ -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);