adamsaghy commented on code in PR #3933:
URL: https://github.com/apache/fineract/pull/3933#discussion_r1639675980
##########
fineract-core/src/main/java/org/apache/fineract/commands/service/CommandSourceService.java:
##########
@@ -64,8 +66,12 @@ public CommandSource
saveInitialSameTransaction(CommandWrapper wrapper, JsonComm
@NotNull
private CommandSource saveInitial(CommandWrapper wrapper, JsonCommand
jsonCommand, AppUser maker, String idempotencyKey) {
- CommandSource initialCommandSource = getInitialCommandSource(wrapper,
jsonCommand, maker, idempotencyKey);
- return commandSourceRepository.saveAndFlush(initialCommandSource);
+ try {
+ CommandSource initialCommandSource =
getInitialCommandSource(wrapper, jsonCommand, maker, idempotencyKey);
+ return commandSourceRepository.saveAndFlush(initialCommandSource);
+ } catch (JpaSystemException jse) {
Review Comment:
This is not checking whether the issue was with the duplicate idempotency
key.. Please de the proper checks! We want to throw
IdempotentCommandProcessUnderProcessingException **only** if it failed with
idempotency key duplication error!
--
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]