Emitting 'error'-event
See original GitHub issueThere is this line 228 in the main file in onErrored
:
self.emit('error', err);
As the error is emitted, this causes the whole process to end, if the error isn’t listened on elsewhere. This can lead to server crashes if Papertrail cannot be connected to. I thought maybe this should be mentioned in the docs. 😃
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
ErrorEvent - Web APIs - MDN Web Docs - Mozilla
desktop desktop
Chrome Edge
ErrorEvent Full support. Chrome10. Toggle history Full support. Edge12. Togg...
ErrorEvent() constructor Full support. Chrome16. Toggle history Full support. Edge14. Togg...
Read more >Catch all `error` events from any EventEmitter in node
When an EventEmitter instance experiences an error, the typical action is to emit an 'error' event. Error events are treated as a special ......
Read more >ErrorEvent is emitted in websocket's 'error' event, but ... - GitHub
When binding to a WebSocket error event, it looks like you're handed an ErrorEvent , instead of an Error as currently documented.
Read more >uvw::ErrorEvent Struct Reference
Detailed Description. The ErrorEvent event. Custom wrapper around error constants of libuv . Definition at line 22 of file emitter.h.
Read more >Events | Node.js v19.3.0 Documentation
listenerCount(eventName); emitter.listeners(eventName); emitter.off(eventName, listener) ... the typical action is for an 'error' event to be emitted.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So I’ve come across this as well.
This is the worst to debug. Without
longjohn
Node just crashes with a connection error, without any hint at all where the problem could be (stacktrace is a threeliner). This took me hours to find.@matteocontrini: Are you seriously suggesting to keep your “Usage” example? This will crash the whole Node process in case something goes wrong.
For the record, there is nothing wrong with emitting your errors on your own stream. Or publish a library with a streaming API. But this is no streaming API. It’s a drop-in replacement for a logging transport. This needs at least documentation. Also examples that don’t crash the process would probably be a good idea.
@dmiddlecamp’s #61 has been released to NPM in
1.0.4
. If anyone experiences this or believes they have, please make sure you’re running >= 1.0.4; it may mitigate this issue to the point of eliminating it.