dimas-b commented on code in PR #4396:
URL: https://github.com/apache/polaris/pull/4396#discussion_r3220816281


##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/JdbcBasePersistenceImpl.java:
##########
@@ -918,6 +919,10 @@ public PolarisPrincipalSecrets storePrincipalSecrets(
                   .toList(),
               realmId));
     } catch (SQLException e) {
+      if (datasourceOperations.isConstraintViolation(e)) {
+        throw new AlreadyExistsException(
+            String.format("Client ID already in used: %s", resolvedClientId), 
e);

Review Comment:
   Can we be sure the constraint violation is about the client ID? :thinking: 
   
   It might be sufficient to report the JDBC error message as an 
`AlreadyExistsException`... WDYT?



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