# Beneficial Owner & Document Upload Drop-Ins possible mishandled error

**URL:** <https://discuss.dwolla.com/t/beneficial-owner-document-upload-drop-ins-possible-mishandled-error/8854>\
**Category:** API Support\
**Created:** [March 16, 2023, 5:15am UTC](https://discuss.dwolla.com/t/beneficial-owner-document-upload-drop-ins-possible-mishandled-error/8854 "2023-03-16T05:15:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben\_Davidson](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/ben_davidson/32/3822_2.png) [@Ben\_Davidson](https://discuss.dwolla.com/u/Ben_Davidson)\
**Post date:** [March 16, 2023, 5:15am UTC](https://discuss.dwolla.com/t/beneficial-owner-document-upload-drop-ins-possible-mishandled-error/8854/1 "2023-03-16T05:15:01Z")

</div>

Hi all 👋

Making a new post here as I haven’t seen anyone else mention an issue similar to what I’m experiencing. I’m working with the drop-in components, specifically `dwolla-beneficial-owners` and the `dwolla-document-uploads` and running into an issue as they are initializing. I’ve attached a screenshot of the errors being returned from `dwolla-web.js` (version `2.1.9`) below:  
 ![Screenshot from 2023-03-16 00-03-05](https://global.discourse-cdn.com/dwolla/original/2X/3/3e5d7a65d4cea1e3313375cf3e13e3ef755a4333.png)

I’ve already successfully interfaced with the `dwolla-business-vcr` drop-in, so I’m fairly confident there isn’t anything wrong with the configuration of the dwolla object. On top of that, I’ve confirmed that my server is responding with valid token responses. Just to be thorough, the request being made for those client tokens are the two following requests:

```auto
{'action': 'beneficialownership.read', 'links': {'customer': {'href': 'https://api-sandbox.dwolla.com/customers/5f3abea0-c4ed-4d93-9f86-536d0bbabf94'}}}

```

and

```auto
'action': 'beneficialowners.create', 'links': {'customer': {'href': 'https://api-sandbox.dwolla.com/customers/5f3abea0-c4ed-4d93-9f86-536d0bbabf94'}}}

```

The uuid shown in those request bodies is, of course, the customer id I’m handing the `dwolla-beneficial_owners` element and corresponds to a newly-created customer on my sandbox account. The type of this customer is corporation. Edit - Also I’m aware that the `links` key in those requested bodies are incorrect (see [associated post](https://discuss.dwolla.com/t/error-posting-to-client-tokens-from-drop-in-component/8764)) - my server is accounting for this and changing the key to `_links`.

Finally, as far as how this is manifesting visually, I’ve attached another screenshot. The component is, of course “stuck” gathering info. For what it’s worth, the same error (i.e. exact same line in `dwolla-web.js`) occurs when attempting to initialize the `dwolla-document-uploads` drop-in.  
 ![Screenshot from 2023-03-16 00-14-50](https://global.discourse-cdn.com/dwolla/original/2X/8/84c0b33fc91d6dff7852613511831dd6d877ce69.png)

---

<div class="post-metadata">

**Author:** ![shreya](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/shreya/32/2154_2.png) [@shreya](https://discuss.dwolla.com/u/shreya)\
**Post date:** [March 16, 2023, 6:08pm UTC](https://discuss.dwolla.com/t/beneficial-owner-document-upload-drop-ins-possible-mishandled-error/8854/2 "2023-03-16T18:08:46Z")

</div>

Hi @Ben_Davidson – thanks for the detailed explanation of what you are seeing with the drop-in components.

I tried a few scenarios myself (with deactivated Customers and exempt customers), but was unable to recreate the issue. Would you mind sharing the config object along with the function that proxies calls to your tokenUrl endpoint?

As for the `_links` vs `links` discrepancy in the library, we have noted this internally to update in a way that it remains backwards compatible for current users of the library!

---

<div class="post-metadata">

**Author:** ![Ben\_Davidson](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/ben_davidson/32/3822_2.png) [@Ben\_Davidson](https://discuss.dwolla.com/u/Ben_Davidson)\
**Post date:** [March 16, 2023, 7:31pm UTC](https://discuss.dwolla.com/t/beneficial-owner-document-upload-drop-ins-possible-mishandled-error/8854/3 "2023-03-16T19:31:22Z")

</div>

I may have some extra details in terms of repro steps. I’m working with the dwolla object configured with the `token` callback function, not the `tokenUrl`. Funny enough, right before you responded, I was messing around with the configuration and the component initializes just fine when the dwolla object is configured with `tokenUrl` instead of a function used to fetch the token. The callback I’m configuring with effectively looks like

```auto
token: req => Promise.resolve(<request performed against server with axios, return value is {token: '<client_token_string>'}>),

```

So _something_ is definitely a little wonky here but it’s still not super clear. I find it odd that this callback ↔ token configuration works fine with the verified business customer drop-in 🤔. I’ll keep digging but any help is appreciated!

Edit: Alright I’ve figured out the issue. It is definitely on my end. I’ll see if I can close this topic. Apologies for the false alarm but I appreciate you confirming all was well @shreya!

---

<div class="post-metadata">

**Author:** ![shreya](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/shreya/32/2154_2.png) [@shreya](https://discuss.dwolla.com/u/shreya)\
**Post date:** [March 17, 2023, 2:17pm UTC](https://discuss.dwolla.com/t/beneficial-owner-document-upload-drop-ins-possible-mishandled-error/8854/4 "2023-03-17T14:17:33Z")

</div>

Hi @Ben_Davidson – thanks for the update!

No worries at all. Glad you were able to get it to work! 🙂

---

<div class="post-metadata">

**Author:** ![shreya](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/shreya/32/2154_2.png) [@shreya](https://discuss.dwolla.com/u/shreya)\
**Post date:** [March 17, 2023, 2:17pm UTC](https://discuss.dwolla.com/t/beneficial-owner-document-upload-drop-ins-possible-mishandled-error/8854/5 "2023-03-17T14:17:59Z")

</div>


