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

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

Closed
NickMihaiu91 opened this issue Aug 29, 2017 · 7 comments

Comments

@NickMihaiu91
Copy link

@NickMihaiu91 NickMihaiu91 commented Aug 29, 2017

Hello,

For a few weeks now, we are getting this error. We initially were using the unofficial winston/node-loggly but changed to the oficial one in the hope we get rid of this problem, but it persists.

As you can see in the image the problem originates in the node loggly bulk library.
node-loggly-bulk

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

Thank you,
Nick

@mostlyjason
Copy link

@mostlyjason mostlyjason commented Aug 29, 2017

Thanks for reporting this! You're probably right that the error response is HTML. We'd have to check to see if we are handling the errors correctly. I have added this to our backlog, but there are a few other projects ahead of this one in the queue. Let us know if you get a fix before we get a chance.

@NickMihaiu91
Copy link
Author

@NickMihaiu91 NickMihaiu91 commented Aug 30, 2017

Thank you for the reply @mostlyjason . Could you please tell me what priority would this have and if you can give any estimate on when you'll a chance to look into this?

@mostlyjason
Copy link

@mostlyjason mostlyjason commented Aug 30, 2017

That's a good question. How is this error message affecting you? Is it causing the application to stop or does it merely log an error and then continue?

@NickMihaiu91
Copy link
Author

@NickMihaiu91 NickMihaiu91 commented Aug 31, 2017

It's not causing our application to stop since we catch and treat the error, but this would happen when sending a log to Loggly so we're losing data and since we don't have the initial stack we're not aware of what logs are we losing.So there might be errors that are hidden because of this.

@mostlyjason
Copy link

@mostlyjason mostlyjason commented Aug 31, 2017

FYI Winston offers a continuation function that allows you to recover when there is an error loggly/winston-loggly-bulk#4. I haven't looked at this library recently for not sure if we offer it. Nevertheless, I think the better solution here is to fix this problem so that the library will automatically retry. I'm hoping to get this in our Sprint within the next few weeks.

@NickMihaiu91
Copy link
Author

@NickMihaiu91 NickMihaiu91 commented Sep 1, 2017

Thanks for pointing that out @mostlyjason, but indeed the actual solution would be that the library will automatically retry. Please let me know when you get to work on this if I can help you with some more data or in any other way. Thank you!

@mostlyjason
Copy link

@mostlyjason mostlyjason commented Nov 8, 2017

Addressed in 2.1.0 please reopen if it keeps happening after updating.

@mostlyjason mostlyjason closed this Nov 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.