Beneficial Owner & Document Upload Drop-Ins possible mishandled error

Hi all :wave:

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

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:

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

and

'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) - 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

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!

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

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 :thinking:. 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!

Hi @Ben_Davidson – thanks for the update!

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