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

(intermediate value) is not iterable #1408

Open
NakileSolutions opened this issue Jul 8, 2024 · 0 comments
Open

(intermediate value) is not iterable #1408

NakileSolutions opened this issue Jul 8, 2024 · 0 comments

Comments

@NakileSolutions
Copy link

NakileSolutions commented Jul 8, 2024

Hello,

I'm trying to instantiate multiple client instances manually as written in your README.me but when I try to use the request function I have this error:
TypeError: (intermediate value) is not iterable

You can have a look at my code here :

import { Client } from "@sendgrid/client";
import sgMail from "@sendgrid/mail";
import { config } from "../../config";

const sgClient = new Client();
const sgClient2 = new Client();

sgClient.setApiKey(config.apiKey);
sgClient2.setApiKey(config.apiKey2);

export { sgClient, sgClient2, sgMail };
const sendgrid = priority ? sgClient2 : sgClient;
    // eslint-disable-next-line no-await-in-loop
    const [res, body]: [ClientResponse, TemplateResponseBody] = await sendgrid.request({
      method: "GET",
      url,
    });
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

1 participant