There is a issue about Auth0 and Mailchimp

Hi everyone, new to here to Auth0. Looking to create a rule for a User that signs up on Auth0 to then add the user to Mailchimp.
When I use mailchimp marketing SDK to Test, the log shows that:

Error:
{
  "code": "ENOTFOUND",
  "message": "getaddrinfo ENOTFOUND us-20.api.mailchimp.com",
  "name": "Error",
  "stack": "Error: getaddrinfo ENOTFOUND us-20.api.mailchimp.com\n    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26)\n    at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17)"
}

And the action code is below:

exports.onExecutePostUserRegistration = async (event, api) => {
  const client = require('@mailchimp/mailchimp_marketing');

  client.setConfig({
    apiKey: event.secrets.MC_API_KEY,
    server: event.secrets.MC_SERVER_PREFIX
  });

  const response = await client.lists.addListMember(event.secrets.MC_LIST_ID, {
    email_address: "nikobe123@163.com",
    status: "subscribed",
  });
  console.log("response",response);

};

Can someone help show me how to fix it? Thanks!

Hey there!

When looking at the context you provided, I’m not sure if it is actually related to our stack but rather Mailchimp as you are getting an error from hitting their API. Are you sure you are using their SDK properly?