Another dev I'm working with ended up hunting for half-an-hour looking for a reason why an activity wasn't triggering as expected, turns out there was a typo in the field.
However, definitely something avoidable if errors were accessible from the mongoose hooks. Right now they end up unhandled:
|
doc.populate(paths, function(err, docP) { |
|
if (docP.wasNew) { |
|
stream.FeedManager.activityCreated(docP); |
|
} |
|
}); |