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

Can't run any passthrough calls with Vessel #315

Open
Samanimkr opened this issue Nov 7, 2023 · 0 comments
Open

Can't run any passthrough calls with Vessel #315

Samanimkr opened this issue Nov 7, 2023 · 0 comments

Comments

@Samanimkr
Copy link

So I've been trying to use this integrations library to get a simple google calendar passthrough call working but keep running into an auth problem.

Code:

const vessel = require("@vesselapi/integrations");

const main = async () => {
  const auth = vessel.auth.oauth2(vessel.googleCalendar.auth);
  
  const response = await vessel.googleCalendar.client.passthrough(auth, {
    method: "GET",
    url: "/calendar/v3/calendars/primary/events",
  });

  console.log("response: ", response);
};

main();

Error:

const fetchRawResponse = async (auth2, args) => await auth2.retry(async () => {
                                                                ^
TypeError: auth2.retry is not a function
    at fetchRawResponse (.../node_modules/@vesselapi/integrations/dist/index.js:251:65)
    at Object.makeValidatedRequest [as passthrough] (.../node_modules/@vesselapi/integrations/dist/index.js:279:30)
    at main (.../vessel.js:13:55)
    at Object.<anonymous> (.../vessel.js:29:1)
    at Module._compile (node:internal/modules/cjs/loader:1233:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47

Node.js v20.5.0
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