Repository: incubator-unomi
Updated Branches:
  refs/heads/master e93fab06a -> 9bf0ebf90


UNOMI-156 add error message instead of logger


Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/9bf0ebf9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/9bf0ebf9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/9bf0ebf9

Branch: refs/heads/master
Commit: 9bf0ebf905e037598bed16030c90c978b8991979
Parents: e93fab0
Author: dgaillard <[email protected]>
Authored: Wed Feb 21 11:21:50 2018 +0100
Committer: dgaillard <[email protected]>
Committed: Wed Feb 21 11:21:50 2018 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/9bf0ebf9/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java
----------------------------------------------------------------------
diff --git 
a/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java 
b/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java
index c6a5a5d..cb332df 100644
--- a/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java
+++ b/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java
@@ -453,10 +453,9 @@ public class ProfileServiceEndPoint {
      */
     @GET
     @Path("/existingProperties")
-    public Collection<PropertyType> getExistingProperties(@QueryParam("tag") 
String tag, @QueryParam("isSystemTag") boolean isSystemTag, 
@QueryParam("itemType") String itemType, @HeaderParam("Accept-Language") String 
language, @Context final HttpServletResponse response) {
+    public Collection<PropertyType> getExistingProperties(@QueryParam("tag") 
String tag, @QueryParam("isSystemTag") boolean isSystemTag, 
@QueryParam("itemType") String itemType, @HeaderParam("Accept-Language") String 
language, @Context final HttpServletResponse response) throws IOException {
         if (StringUtils.isBlank(tag) || StringUtils.isBlank(itemType)) {
-            logger.error("Missing mandatory query parameters when requesting 
/cxs/profiles/existingProperties, mandatory query parameters are tag and 
itemType");
-            response.setStatus(Response.Status.BAD_REQUEST.getStatusCode());
+            response.sendError(Response.Status.BAD_REQUEST.getStatusCode(), 
"Missing mandatory query parameters when requesting 
/cxs/profiles/existingProperties, mandatory query parameters are tag and 
itemType");
             return null;
         }
         Set<PropertyType> properties;

Reply via email to