RocketChat / Rocket.Chat.js.SDK

Utility for apps and bots to interact with Rocket.Chat via DDP and/or API
MIT License
136 stars 95 forks source link

Fix unhandled exception while resume login #35

Closed kb0304 closed 6 years ago

kb0304 commented 6 years ago

Fixes https://github.com/RocketChat/botpress-channel-rocketchat/issues/3

timkinnane commented 6 years ago

Congrats @kb0304, you're now an SDK contributor. I made a couple minor style changes and rebuilt for release as v0.2.8 - please let me know if that solves your botpress issue.

kb0304 commented 6 years ago

@timkinnane Thank you.

But there seems to be a problem.. https://github.com/RocketChat/Rocket.Chat.js.SDK/commit/6e3c0aa85519ba8f9af76b5e59e6a4f1b5e17973#diff-5a9a021ea118722ea4f1ed536977a543R111 Not passing a function to the catch as an argument leads to the exception being not handeled.

timkinnane commented 6 years ago

@kb0304 Eesh, I was afraid of that. Sorry, I will fix that and release another version. I have used .catch() on promises to suppress uncaught promise fails before, so I thought that was safe and better than having an empty function. Guess not.

Do you know if the error you're addressing can be manually triggered, so I can add a regression test to make sure I can't release another broken version?

timkinnane commented 6 years ago

0.2.9 released. Probably should have done both of these through a pre-release tag so you can confirm it first. :/