DaniilRoman commented on code in PR #1181:
URL: https://github.com/apache/polaris/pull/1181#discussion_r2006481271


##########
service/common/src/main/java/org/apache/polaris/service/exception/IcebergExceptionMapper.java:
##########
@@ -191,6 +192,7 @@ static int mapExceptionToResponseCode(RuntimeException rex) 
{
       case IllegalArgumentException e -> Status.BAD_REQUEST.getStatusCode();
       case UnsupportedOperationException e -> 
Status.NOT_ACCEPTABLE.getStatusCode();
       case WebApplicationException e -> e.getResponse().getStatus();
+      case PersistenceException e -> Status.UNAUTHORIZED.getStatusCode();

Review Comment:
   Thank you for your feedback 🙏 
   This makes total sense. Instead of extending the existing mapper, I've 
created a new one where I set a message from PersistenceException but shouldn't 
include the information like `Exception [EclipseLink-4002] (Eclipse Persistence 
Services - 4.0.4.v202407190748...`
   
   I've checked existing mappers and I see that we use a level INFO for every 
known exception I've chosen an INFO level as well instead of an ERROR level



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to