You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by GitBox <gi...@apache.org> on 2021/03/31 12:26:39 UTC

[GitHub] [unomi] dgriffon commented on a change in pull request #273: UNOMI-449 : forward existing endpoints to jax-rs endpoints

dgriffon commented on a change in pull request #273:
URL: https://github.com/apache/unomi/pull/273#discussion_r604850532



##########
File path: rest/src/main/java/org/apache/unomi/rest/EventsCollectorEndpoint.java
##########
@@ -154,11 +139,13 @@ private EventCollectorResponse doEvent(String eventsCollectorRequestAsString, Lo
             */
         } else {
             Profile sessionProfile = session.getProfile();
+            final String errorMessage = String.format("No valid profile found or persona found for profileId=%s, aborting request !", session.getProfileId());
             if (sessionProfile.getItemId() != null) {
                 // Reload up-to-date profile
                 profile = profileService.load(sessionProfile.getItemId());
                 if (profile == null || profile instanceof Persona) {
-                    throw new InternalServerErrorException(String.format("No valid profile found or persona found for profileId=%s, aborting request !", session.getProfileId()));
+                    logger.error(errorMessage);

Review comment:
       Thanks for the comment, you're right, we should protect the `session.getProfileId()` displayed in the logs




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org