Reporting a bug on nodejs SDK


#1

Hi
I was trying to find/report on a bug in your SDK.
Your SDK is crashing my process in the case that I make a connection to remote couchbase and querying it with N1QL. If the query takes a long time and maybe the connection is lost due to connectivity issues, then eventually you return “timeout” answer but you return it with chunks and then try to JSON.parse on the last chunk, which obviously fails and crashes the process.

First of all, never crash a process in a SDK. Always throw an error back to the developer so he can handle any such errors and keep his application alive.

Secondly, why fail at all? Aggregate the chunks and parse at the end.


#2

Thanks @tzali for letting us know. Bug reports are best filed at issues.couchbase.com. Any chance you can file this there? It’d be great if you could include details on how to reproduce. Or perhaps you have a trace from the crash you observed?


#3

Of course. I’ll be happy to report it there. In fact I searched such a thing on google (“nodejs sdk couchbase report bug”, etc.) and it didn’t come up for me.
It is hard for me to reproduce as it happens when the connection is lost in the middle of the request. I’ll have to do a special maneuver for that. I can say what line of code crashes the process and when it happens.