Is there a way to make sure all requests to server from NodeJS SDK are finished
We are building a CLI app and there is always a problem that NodeJS process finishes before all requests to Countly server are finished so, e.g. errors are never sent because I am not able to find some callback or promise or something similar that would tell me that all requests are finished and it is safe to finish the process. The only way to actually send errors for me is to just wait an arbitrary number of seconds (using setTimeout) after I do
and only then finish the process execution
Could you please help me understand what can be done in this situation?