DuplicateResearch Error - Plaid (Sandbox) + Dwolla (Sandbox) Creating Funding Source Error


When a Customer already has funding source(s) and I try to link a new bank account, I get the following error:

Unhandled rejection Error:

    Unhandled rejection Error: {
        "code":" DuplicateResource",
        "message":"Bank already exists: id=6a17054b-4c54-4f1a-b4e7-3e4510a736a6",
                "href":    "https://api-sandbox.dwolla.com/funding-sources/6a17054b-4c54-4f1a-b4e7-3e4510a736a6",

I have several questions about this error.

  1. How is it possible to reproduce this error in real life (with production versions of Plaid and Dwolla)? On the other hand, is the reason that I’m getting this error with Plaid Link due to the fact that the Sandbox version of Plaid has only a single “bank?”
  2. What is the best way to catch this error so I can gracefully handle it?

Hey Scott,

  1. You can reproduce this error in production by adding a bank with the same routing number + account number for the same customer. I think you’re right that this error is occurring because Plaid only has one bank in Sandbox.
  2. It would probably look something like this:
createFundingSource().then(function(res) {
  // success
}, function(err) {
  if (err.body.code == "DuplicateResource") {
    // handle duplicate

We also return a link to the funding source that already exists in err.body._links, so you could use that to figure out the funding source that already exists.

Hopefully that helps.

Is it possible to generate different routing number + account number combinations in Plaid sandbox using user_custom?

Hi @Hadil_Sabbagh, I believe not. Plaid Sandbox only returns two bank accounts - savings and checking with preset RN // AN. You can test adding banks to Dwolla Sandbox by removing a funding-source, and attaching another one again. Just for information, by default, the bank limit is 6 per Customer and 2 per Master Account.

Please let me know if you have any questions, or we can help with anything!