Skip to content

Commit

Permalink
docfix/Add error message AccountRoutingNotUnique
Browse files Browse the repository at this point in the history
  • Loading branch information
constantine2nd committed Sep 6, 2024
1 parent ad1b102 commit 57ebe05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions obp-api/src/main/scala/code/api/util/ErrorMessages.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 57ebe05

Please sign in to comment.