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

Please add handler for `undefined`: Tags processing throwing type error #33

Closed
hodonsky opened this issue May 19, 2018 · 4 comments
Closed

Comments

@hodonsky
Copy link

@hodonsky hodonsky commented May 19, 2018

When I pass an env var that is undefined into the tags array winston-loggly-bulk crashes my whole app.

I'm sure you already know where this is:

 TypeError: Cannot read property 'length' of undefined
20:04:32 0|server   |     at /var/app/current/node_modules/node-loggly-bulk/lib/loggly/client.js:228:37
20:04:32 0|server   |     at Array.filter (<anonymous>)
20:04:32 0|server   |     at exports.Loggly.Loggly.tagFilter (/var/app/current/node_modules/node-loggly-bulk/lib/loggly/client.js:224:15)
20:04:32 0|server   |     at new exports.Loggly (/var/app/current/node_modules/node-loggly-bulk/lib/loggly/client.js:84:12)
20:04:32 0|server   |     at Object.exports.createClient (/var/app/current/node_modules/node-loggly-bulk/lib/loggly/client.js:50:10)
20:04:32 0|server   |     at new exports.Loggly (/var/app/current/node_modules/winston-loggly-bulk/lib/winston-loggly.js:52:24)
20:04:32 0|server   |     at exports.Logger.Logger.add (/var/app/current/node_modules/winston/lib/winston/logger.js:481:41)
20:04:32 0|server   |     at Object.winston.(anonymous function) [as add] (/var/app/current/node_modules/winston/lib/winston.js:86:34)
20:04:32 0|server   |     at AuthService.Service (/var/app/current/dist/common/Service.js:45:23)
20:04:32 0|server   |     at new AuthService (/var/app/current/dist/auth/Service.js:77:126)
20:04:32 0|server   |     at exports.default (/var/app/current/dist/common/prepare.js:28:17)
20:04:32 0|server   |     at AppServerFactory.createWorker (/var/app/current/dist/common/AppServerFactory.js:78:36)
20:04:32 0|server   |     at AppServerFactory.startApp (/var/app/current/dist/common/AppServerFactory.js:70:25)
20:04:32 0|server   |     at AppServerFactory.instance (/var/app/current/dist/common/AppServerFactory.js:83:31)
20:04:32 0|server   |     at Object.<anonymous> (/var/app/current/dist/server.js:31:29)
20:04:32 0|server   |     at Module._compile (module.js:635:30)
@Shwetajain148
Copy link

@Shwetajain148 Shwetajain148 commented May 23, 2018

Hi @relicmelex, Currently, I'm busy with some ongoing issues but certainly, I'll pick this up once I get some time.

Thanks for reporting.

@Shwetajain148
Copy link

@Shwetajain148 Shwetajain148 commented Aug 1, 2018

Hi @relicmelex, Good news here! The fix for your issue has been made and now in production. Please let me know if you come across of any issue again.

Thanks!

@Shwetajain148
Copy link

@Shwetajain148 Shwetajain148 commented Aug 3, 2018

Since this has already been handled, closing this issue. Please re-open if it come up again.

Thanks!

@hodonsky
Copy link
Author

@hodonsky hodonsky commented Aug 3, 2018

Awesome thanks, I'll update and report back only if there are any further issues. Cheers!

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.