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 11:54:29 UTC

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

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



##########
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:
       maybe protect this message with "if (logger.isDebugEnabled()) {"
   




-- 
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