Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: connect EAFNOSUPPORT ::1:80 #561

Open
cantide5ga opened this issue Jan 10, 2023 · 4 comments
Open

Error: connect EAFNOSUPPORT ::1:80 #561

cantide5ga opened this issue Jan 10, 2023 · 4 comments

Comments

@cantide5ga
Copy link

Has anyone had any luck using this in AWS Lambda? Per the title, I'm assuming the endpoints are IPv6 which Lambda does not support for outbound calls.

Any tricks? Or am I interpretting that Axios error wrong?

What I've tried: modify createRequestFunction in common.ts to force IPv4 in hopes that the Plaid API network interface support both. No dice. I'm using this for a linkTokenCreate request.

@phoenixy1
Copy link
Contributor

Hmm. I don't know much about AWS Lambda, but I do know we have quite a few customers using it and I've never heard of any compatibility issues between Plaid and AWS Lambda or of anyone encountering that error code (I searched our entire Zendesk -- the error EAFNOSUPPORT doesn't seem to appear in any support ticket we've ever received). As a result, I'm guessing this could potentially be an issue with the AWS Lambda configuration?

I'm not sure if this will help at all, but https://github.com/aws-samples/aws-plaid-demo-app is an example of a demo app that uses AWS Lambda with the Python client library.

@Lomelinov19900
Copy link

Has anyone had any luck using this in AWS Lambda? Per the title, I'm assuming the endpoints are IPv6 which Lambda does not support for outbound calls.

Any tricks? Or am I interpretting that Axios error wrong?

What I've tried: modify createRequestFunction in common.ts to force IPv4 in hopes that the Plaid API network interface support both. No dice. I'm using this for a linkTokenCreate request.

@cantide5ga
Copy link
Author

Thanks @phoenixy1, this is a good lead. Circling back on this today to see if the config needs to be tweaked.

Thanks for the sanity check - will follow-up.

@cantide5ga
Copy link
Author

cantide5ga commented Jan 12, 2023

This was due to an invalid/malformed basePath in the Configuration parameter for the PlaidApi constructor. In this case a typo of the "development" environment property.

Would this project consider tighter type defs for PlaidEnvironments and by extension, basePath? Either changing PlaidEnvironments to an enum or changing from an interface into a type of string literals I think would help users not to shoot themselves in the foot. Will open a PR for discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants