vorburger commented on a change in pull request #664: 
FINERACT-802-restrict-client-to-have-single-self-service-user
URL: https://github.com/apache/fineract/pull/664#discussion_r356962475
 
 

 ##########
 File path: 
fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserWritePlatformServiceJpaRepositoryImpl.java
 ##########
 @@ -349,6 +349,10 @@ private void handleDataIntegrityIssues(final JsonCommand 
command, final Throwabl
                     username);
         }
 
+        if (realCause.getMessage().contains("'unique_self_client'")) {
 
 Review comment:
   Depending on the message of an exception containing a specific hard coded 
String is not great... the way one would usually do something like this in Java 
is to check for ‘instanceof‘ a particular (sub)class of an Exception. Could you 
do that here?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to