Handle duplicate account key issue gracefully

Change transaction propagation to SUPPORTS for that as otherwise an UnexpectedRollbackException gets thrown
This commit is contained in:
2019-05-12 11:13:22 +02:00
parent 1050e9b258
commit 91d5385dbd
2 changed files with 4 additions and 2 deletions

View File

@@ -29,7 +29,8 @@ public enum ResponseReason {
MISSING_TRANSACTION_ID(HttpStatus.INTERNAL_SERVER_ERROR), MISSING_TRANSACTION_ID(HttpStatus.INTERNAL_SERVER_ERROR),
INVALID_TRANSACTION_ID(HttpStatus.INTERNAL_SERVER_ERROR), INVALID_TRANSACTION_ID(HttpStatus.INTERNAL_SERVER_ERROR),
TRANSACTION_NOT_FOUND(HttpStatus.INTERNAL_SERVER_ERROR), TRANSACTION_NOT_FOUND(HttpStatus.INTERNAL_SERVER_ERROR),
ACCOUNT_NOT_FOUND(HttpStatus.INTERNAL_SERVER_ERROR); ACCOUNT_NOT_FOUND(HttpStatus.INTERNAL_SERVER_ERROR),
DUPLICATE_ACCOUNT_KEY(HttpStatus.INTERNAL_SERVER_ERROR);
private HttpStatus httpStatus; private HttpStatus httpStatus;

View File

@@ -144,3 +144,4 @@ financer.error-message.MISSING_TRANSACTION_ID=No transaction entered!
financer.error-message.INVALID_TRANSACTION_ID=The transaction is not valid! financer.error-message.INVALID_TRANSACTION_ID=The transaction is not valid!
financer.error-message.TRANSACTION_NOT_FOUND=The transaction could not be found! financer.error-message.TRANSACTION_NOT_FOUND=The transaction could not be found!
financer.error-message.ACCOUNT_NOT_FOUND=The account could not be found! financer.error-message.ACCOUNT_NOT_FOUND=The account could not be found!
financer.error-message.DUPLICATE_ACCOUNT_KEY=An account with the given key already exists!