Cocoa-Puffs commented on code in PR #4828:
URL: https://github.com/apache/fineract/pull/4828#discussion_r2180481267


##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformDomainRuleExceptionMapper.java:
##########
@@ -46,8 +47,14 @@ public class PlatformDomainRuleExceptionMapper implements 
FineractExceptionMappe
     @Override
     public Response toResponse(final AbstractPlatformDomainRuleException 
exception) {
         log.warn("Exception occurred", 
ErrorHandler.findMostSpecificException(exception));
-        final ApiGlobalErrorResponse notFoundErrorResponse = 
ApiGlobalErrorResponse.domainRuleViolation(
-                exception.getGlobalisationMessageCode(), 
exception.getDefaultUserMessage(), exception.getDefaultUserMessageArgs());
+        final ApiGlobalErrorResponse notFoundErrorResponse;

Review Comment:
   If it is a validation exception I want to include the error messages that 
were generated during validation. These validation messages are stored in the 
errors list in the exception, not in the defaultUserMessageArgs. I did it this 
way to keep the new `PlatformApiDomainRuleValidationException` consistent with 
`PlatformApiDataValidationException`. But I can change it.



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