Skip to content

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

@aleCeres

Description

@aleCeres

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions