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


##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditReportWritePlatformServiceImpl.java:
##########
@@ -202,18 +202,15 @@ public CommandProcessingResult deleteCreditReport(Long 
creditBureauId, JsonComma
             try {
                 this.creditReportRepository.delete(creditReport);
             } catch (final JpaSystemException | 
DataIntegrityViolationException dve) {
-                throw new 
PlatformDataIntegrityException("error.msg.cund.unknown.data.integrity.issue",
-                        "Unknown data integrity issue with resource: " + 
dve.getMostSpecificCause(), dve);
+                throw ErrorHandler.getMappable(dve, 
"error.msg.cund.unknown.data.integrity.issue",
+                        "Unknown data integrity issue with resource: " + 
dve.getMostSpecificCause().getMessage());

Review Comment:
   The mostSpecificCause() can be null, so here an NPE will happen... i think 
we should be careful to avoid that!



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