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

SyntaxError: Unexpected token ... in JSON (body) response #86

Open
aleCeres opened this issue Mar 22, 2018 · 3 comments
Open

SyntaxError: Unexpected token ... in JSON (body) response #86

aleCeres opened this issue Mar 22, 2018 · 3 comments

Comments

@aleCeres
Copy link

If body is not a JSON there is an error in
node-linkedin/lib/inherits.js:52

as you can see below:

request(parameters, function(err, response, body) {
    return callback(err, typeof body === 'string' ? JSON.parse(body) : body);
});

SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse ()
at Request._callback (/.../node_modules/node-linkedin/lib/inherits.js:52:74)
at Request.self.callback (/.../node_modules/request/request.js:186:22)

@aleCeres
Copy link
Author

I suppose that body is not a valid JSON.

@aleCeres
Copy link
Author

Thank you man,
I dont like mountain
Thanks in advance

@rgglenn150
Copy link

Thank you man,
I dont like mountain
Thanks in advance

Is it working now? how did you fixed it? I'm having the same problem.

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

3 participants
@rgglenn150 @aleCeres and others