Reputation: 11
I'm stuck on this error trying to do health check on my mailchimp api config and i keep getting ENOTFOUND error. I removed my actual api key
The config api call
const mailchimp = require("@mailchimp/mailchimp_marketing");
mailchimp.setConfig({
apiKey: "API-KEY",
server: "us-17",
});
async function run() {
const response = await mailchimp.ping.get();
console.log(response);
}
run();
Error:
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
Error: getaddrinfo ENOTFOUND us-17.api.mailchimp.com
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'us-17.api.mailchimp.com',
response: undefined
}
Followed the developer documentation line by line but can't get past this error. Any help/info would be great
Tried
The config api call
const mailchimp = require("@mailchimp/mailchimp_marketing");
mailchimp.setConfig({
apiKey: "API-KEY",
server: "us-17",
});
async function run() {
const response = await mailchimp.ping.get();
console.log(response);
}
run();
Expected :
{
"health_status": "Everything's Chimpy!"
}
Upvotes: 0
Views: 206
Reputation: 11
Server Prefix typo.
Should have been "us17" not "us-17"
🤦🏽♂️.
Upvotes: 0