Handle duplicate account key issue gracefully
Change transaction propagation to SUPPORTS for that as otherwise an UnexpectedRollbackException gets thrown
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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!
|
||||||
Reference in New Issue
Block a user