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

Fetcher throwing error #1746

Closed
sravannerella opened this issue Jan 25, 2022 · 2 comments
Closed

Fetcher throwing error #1746

sravannerella opened this issue Jan 25, 2022 · 2 comments
Assignees

Comments

@sravannerella
Copy link

sravannerella commented Jan 25, 2022

Hi team,

I'm running into an error when triggering an API request using the fetcher using the following code. Please let me know if i missed anything.

Fetcher Resource: https://coda.io/packs/build/latest/samples/topic/fetcher/

Code:

async function([params], context) {
    let data = await context.fetcher.fetch({method: "GET", url: "https://jsonplaceholder.typicode.com/todos/1"});
    console.log(data.response):
}

Error:
TypeError: Cannot read properties of undefined (reading 'status')
at Object.handleFetcherStatusError (@codahq/packs-sdk/dist/bundles/thunk_bundle.js:4699:21)
...

Environment:
node v17.4.0
npm 8.3.1

@ekoleda-codaio
Copy link
Contributor

I assume you are running this from the command line? Older versions of the SDK required that you add the --fetch flag to allow the formula to make real HTTP requests. Try that, or try upgrading to the latest version.

@ekoleda-codaio ekoleda-codaio self-assigned this Jan 27, 2022
@ekoleda-codaio
Copy link
Contributor

As you can tell, we aren't actively using GitHub's issue tracker, and want to centralize support in the Coda community. We're actually going to turn off the issue tracker for now, but if those recommendations don't work feel free to start a thread there.

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

2 participants