Closed robturtle closed 8 years ago
This looks good, but there's now a failing test.
Oh, I see. Let's leave the reconnect
event, but you can still embed the detailed error.
Crap the Github didn't notify me about your comments and I just see it until now. I edited the changes and split them into 3 parts:
'reconnect'
'error'
instead and adjust test file accordinglyI believe the changing of reconnecting behavior is reasonable cause the users definitely don't want their wrong http requests keep retrying again and again until hit the rate limit.
Agreed. Awesome. Thanks!
[koopa@dash-dev node-tweet-stream (master)]$ npm publish
+ node-tweet-stream@2.0.0
Bumped to major since it's breaking.
As we can see in all these 4xx errors, it's all due to the user's fault who construct an illegal query. In such case no matter how many reconnections you tried, the result will still be the same. Thus I think make the stream abort and emit 'error' would be appropriate.
And when an 4xx error occur, providing some short explanation might be good for debugging.