diff --git a/obp-api/src/main/scala/code/api/util/ErrorMessages.scala b/obp-api/src/main/scala/code/api/util/ErrorMessages.scala index d69d4907b8..322302c948 100644 --- a/obp-api/src/main/scala/code/api/util/ErrorMessages.scala +++ b/obp-api/src/main/scala/code/api/util/ErrorMessages.scala @@ -385,6 +385,7 @@ object ErrorMessages { val BankAccountNotFoundByAccountRouting = "OBP-30073: Bank Account not found. Please specify valid values for account routing scheme and address." val BankAccountNotFoundByIban = "OBP-30074: Bank Account not found. Please specify a valid value for iban." val AccountRoutingNotFound = "OBP-30075: Account routing not found, Please specify valid values for account routing scheme and address" + val AccountRoutingNotUnique = "OBP-31075: Routing is not unique at this instance" val BankAccountNotFoundByAccountId = "OBP-30076: Bank Account not found. Please specify a valid value for ACCOUNT_ID." val TransactionRequestAttributeNotFound = "OBP-30078: Transaction Request Attribute not found. Please specify a valid value for TRANSACTION_REQUEST_ATTRIBUTE_ID." diff --git a/obp-api/src/main/scala/code/bankconnectors/LocalMappedConnector.scala b/obp-api/src/main/scala/code/bankconnectors/LocalMappedConnector.scala index 930a1ef1d5..b35a61f648 100644 --- a/obp-api/src/main/scala/code/bankconnectors/LocalMappedConnector.scala +++ b/obp-api/src/main/scala/code/bankconnectors/LocalMappedConnector.scala @@ -849,7 +849,7 @@ object LocalMappedConnector extends Connector with MdcLoggable { def handleRouting(routing: List[BankAccountRouting]): Box[(MappedBankAccount, Option[CallContext])] = { if (routing.size > 1) { // Handle more than 1 occurrence // Routing MUST be unique - val errorMessage = s"Routing ($scheme, $address) is not unique at this instance" + val errorMessage = s"$AccountRoutingNotUnique (scheme: $scheme, address: $address)" Failure(errorMessage) } else { // Handle 0 and 1 occurrence Box(routing.headOption).flatMap(accountRouting => getBankAccountCommon(accountRouting.bankId, accountRouting.accountId, callContext))