Any idea why i have to do this in nodejs to catch ...
# community-help
r
Any idea why i have to do this in nodejs to catch exceptions instead of wrapping in a standard
try-catch
?
Copy code
process.on("uncaughtException", (err) => {
    console.error(err);
  });

  client
    .collections("docs")
    .documents()
    .import(documentsToIndex, { action: "upsert" });
j
That method returns a promise, so you would have to use
await
in front of it to be able to use try catch
r
ah jesus lol. long day of coding thanks
👍 1
j
Btw there was an issue in older versions of tyepsense-js where import didn't throw any errors at all. You want to make sure you use the latest version of the lib
r
i'm on latest. thanks for heads up. great job on the product btw, our team loves typesense over the competitors in teh space
❤️ 1
j
Thanks Robert! That's awesome to hear 🙂
r
love it when i search & find my old issue and solution again. 😄
😄 1