add error message instead of logger
@@ -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;
