Skip to content

Unspecified error from Loggly: SyntaxError: Unexpected token < in JSON at position 0 #70

@NickMihaiu91

Description

@NickMihaiu91

Hello,
In the last few days, we got quite a few errors that seem to be from inside the node loggly library.

The error looks like this:

json: level:error message:Unhandled promise rejection: Unspecified error from Loggly: SyntaxError: Unexpected token < in JSON at position 0 stack:Error: Unspecified error from Loggly: SyntaxError: Unexpected token < in JSON at position 0 at /root/fstg-service-monolith/node_modules/loggly/lib/loggly/client.js:161:18 at Request._callback (/root/fstg-service-monolith/node_modules/loggly/lib/loggly/common.js:139:7) at Request.self.callback (/root/fstg-service-monolith/node_modules/loggly/node_modules/request/request.js:187:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (/root/fstg-service-monolith/node_modules/loggly/node_modules/request/request.js:1048:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at IncomingMessage.<anonymous> (/root/fstg-service-monolith/node_modules/loggly/node_modules/request/request.js:969:12) 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)

It's occurring quite a lot on our part. We wrote to the Loggly support and they suggested also opening an issue here: "This is the first report of this kind we received. I also suggest to report it to the GitHub page of the library that you are using for a wider visibility to the community.".

It seems that we get an error response that is probably HTML and not JSON so node-loggly breaks because it can't handle this. Any idea on why this happens?

Thank you,
Nick

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions