Open astanciu opened 7 years ago
@astanciu - I apologize, due to the pretty significant refactoring for v2, those line numbers don't make sense. If you let me know what it is you want to accomplish or find the corresponding lines, I can take another look.
I updated the original msg above with URLs that point to the commit before v2.
It appears that you're returning an error object, rather than throwing it, which isn't handled at all in the 2nd link (index.js)
Here's the current lines: This line here returns a promise (rejected), which is completely lost/unhandled. https://github.com/arobson/rabbot/blob/master/src/index.js#L529
The code here should maybe throw ? https://github.com/arobson/rabbot/blob/master/src/queueFsm.js#L241
Maybe I'm missing something but I don't see a way to catch the rejection thrown here: https://github.com/arobson/rabbot/blob/a5ccc4dd9652298e8f7e11cf2e08cb4ddb12bf22/src/queueFsm.js#L198
because during an unsubscription, as here: https://github.com/arobson/rabbot/blob/a5ccc4dd9652298e8f7e11cf2e08cb4ddb12bf22/src/index.js#L395
it doesn't return the rejection..