@alviere/core 0.15.0 → 0.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -643,7 +643,8 @@ const AlcoreErrorCodes = {
643
643
  ACCOUNT_STATUS_NOT_ACTIVE: "115001",
644
644
  ACCOUNT_CHILD_FORBIDDEN: "320129",
645
645
  PARENT_ACCOUNT_NOT_ALLOWED: "320104",
646
- BANK_ACCOUNT_PRIMARY_REQUIRES_ACTIVE_STATUS: "340028"
646
+ BANK_ACCOUNT_PRIMARY_REQUIRES_ACTIVE_STATUS: "340028",
647
+ BANK_ACCOUNT_ALREADY_EXISTS: "340029"
647
648
  // Add more error codes as you discover them from the API
648
649
  };
649
650
  const AlcoreErrorMessages = {
@@ -669,7 +670,8 @@ const AlcoreErrorMessages = {
669
670
  [AlcoreErrorCodes.ACCOUNT_STATUS_NOT_ACTIVE]: "Account status not active. Please check your request and try again.",
670
671
  [AlcoreErrorCodes.ACCOUNT_CHILD_FORBIDDEN]: "Used Account can't be used to create a child account.",
671
672
  [AlcoreErrorCodes.PARENT_ACCOUNT_NOT_ALLOWED]: "Parent account not allowed. Please check your request and try again.",
672
- [AlcoreErrorCodes.BANK_ACCOUNT_PRIMARY_REQUIRES_ACTIVE_STATUS]: "Only ACTIVE bank accounts can be set as primary."
673
+ [AlcoreErrorCodes.BANK_ACCOUNT_PRIMARY_REQUIRES_ACTIVE_STATUS]: "Only ACTIVE bank accounts can be set as primary.",
674
+ [AlcoreErrorCodes.BANK_ACCOUNT_ALREADY_EXISTS]: "This bank account has already been added to your account."
673
675
  };
674
676
  function getErrorMessage(errorCode) {
675
677
  return AlcoreErrorMessages[errorCode] || "An unexpected error occurred. Please try again.";