Skip to content

Unexpected token o in JSON at position 0 #69

@bevbomb

Description

@bevbomb

I'm receiving the following error after trying to use the client to get all items. Here is the following error stack trace.

SyntaxError: Unexpected token o in JSON at position 0
    at Object.parse (native)
    at self.oa.get.stream (/user_code/node_modules/xero-node/lib/application.js:303:33)
    at passBackControl (/user_code/node_modules/xero-node/lib/oauth/oauth.js:406:25)
    at IncomingMessage.<anonymous> (/user_code/node_modules/xero-node/lib/oauth/oauth.js:422:17)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickDomainCallback (internal/process/next_tick.js:128:9)

data = JSON.parse(data)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions