adamsaghy commented on code in PR #3232:
URL: https://github.com/apache/fineract/pull/3232#discussion_r1219693818


##########
fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java:
##########
@@ -349,17 +343,10 @@ public void updateAccountNo(final String 
accountIdentifier) {
         this.accountNumberRequiresAutoGeneration = false;
     }
 
-    public void activate(final AppUser currentUser, final DateTimeFormatter 
formatter, final LocalDate activationLocalDate) {
+    public void activate(final AppUser currentUser, final LocalDate 
activationLocalDate) {
 
         if (isActive()) {
-            final String defaultUserMessage = "Cannot activate client. Client 
is already active.";
-            final ApiParameterError error = 
ApiParameterError.parameterError("error.msg.clients.already.active", 
defaultUserMessage,
-                    ClientApiConstants.activationDateParamName, 
activationLocalDate.format(formatter));
-
-            final List<ApiParameterError> dataValidationErrors = new 
ArrayList<>();
-            dataValidationErrors.add(error);
-
-            throw new PlatformApiDataValidationException(dataValidationErrors);
+            throw new ClientAlreadyActiveException();

Review Comment:
   this might break the contract. Priorly the activation date and the 
problematic field was sent, i reckon.



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