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

Calling systemDocumentsIdDownloadGet() throws SyntaxError #14

Open
TroyMorvant opened this issue Oct 29, 2019 · 0 comments
Open

Calling systemDocumentsIdDownloadGet() throws SyntaxError #14

TroyMorvant opened this issue Oct 29, 2019 · 0 comments

Comments

@TroyMorvant
Copy link

TroyMorvant commented Oct 29, 2019

When I try calling the function below:

const data = await this.api.systemDocumentsIdDownloadGet({id: document.id});

It throws the following:

SyntaxError: Unexpected token � in JSON at position 0

at JSON.parse ()
at /Users/troymorvant/Projects/FN/integrations/integration-worker-
connectwise/node_modules/isomorphic-fetch/node_modules/node-fetch/lib/body.js:46:16
at process.internalTickCallback (internal/process/next_tick.js:77:7)

Shouldn't fetch() return a buffer for files rather than attempting to parse the response as json?

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