Superface.ai traffic junction problem #9
-
Hello everybody using Superface (always using latest sdk). I am using Superface for my api connections projects since early 2022 and I am satisfied with it capabilitites. Unfortunatelly in my latest project I have found a problem I cannot solve myself. When I init and use more than one Profile in my script (nodeJS) it use always one provider, although I set another one. Example: provider1 = await sdk.getProvider("provider1"); profile = await sdk.getProfile("example"); .getUseCase("example").perform({data}, {provider3}); // uses provider3 as written If I use in JS script just: provider2 = await sdk.getProvider("provider2"); it works as intended. Do you have any idea what can cause the problem? I would be glad for any help. Thank you very much in advance! Rydlobeton |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey @rydlobeton, thanks for your question. We've flagged this up with the engineering team, and we'll get you a response ASAP. |
Beta Was this translation helpful? Give feedback.
Hello, from the samples you sent, it looks like you are not passing the provider option correctly. It needs to be set to
provider
property. Like this:Or there is a shorter way, by passing provider name as a string: