sematext / winston-logsene

Winston Transport for Logsene
http://sematext.com/logsene
Apache License 2.0
13 stars 6 forks source link

Unhandled error when unreachable is causing crash #22

Closed danielkcz closed 4 years ago

danielkcz commented 4 years ago

The service is/was down and it caused crash in our app running on Heroku. Am I doing something wrong somewhere? I certainly don't want to try/catch every logging attempt 🙈

image

otisg commented 4 years ago

I think the improvement for this was added in https://github.com/sematext/winston-logsene/commit/32b91403435cae295f03a44f6a872558d53d6c39 There was a release made after that. Could you try that one?

danielkcz commented 4 years ago

Looks like it's working with the latest winston-logsene@2.0.10. Thanks.

danielkcz commented 4 years ago

I take it back, problem is still the same. I suppose it's a different kind of error than EAI_AGAIN.

adnanrahic commented 4 years ago

Hey @FredyC ! I've released version 2.0.11 with a fix for this. Can you please check it out and confirm it fixes your issue?

danielkcz commented 4 years ago

@adnanrahic Thanks, I will upgrade, but I guess it would be hard to confirm as it kinda needs Logsene to be down which happens rarely. However, your code change to emit a warning makes sense, so hopefully, it will be alright 🤞