These are chat archives for LearnBoost/mongoose

19th
Apr 2016
Christoph Werner
@codepunkt
Apr 19 2016 08:36
when a save errors while working with async/await, such as
try {
  const session = new Session({ userId })
  await session.save()
} catch (e) {
}
will the error be catched or do i have to do something along these lines to catch it
const error = await session.save()
if (error) throw new Error(error)