flyrain commented on code in PR #1181:
URL: https://github.com/apache/polaris/pull/1181#discussion_r2000166210
##########
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:
Hmm, looks like 500 is more suitable for `PersistenceException`. The 401
status code is reserved for authentication failures, which isn't applicable
here. We may only need to mask the sensitive information a bit.
--
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]