Closed
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Mongoose version
8.8.2
Node.js version
20.18.3
MongoDB server version
6.10.0
Typescript version (if applicable)
5.5.4
Description
This seems to only happen from time to time, maybe cause we are sending a large list of updates, potentially (1-5100) updates in bulk save.
const updateResult = await TrackerValue.bulkSave(toUpdateValues);
// Error updateResult.getWriteErrorCount is not a function
result.failCount = updateResult.getWriteErrorCount();
result.success = true;
return result;
Steps to Reproduce
Unfortunately not easy way to produce. Will try to create separate isolated case, but hopefully even without it would be easy to narrow down when getWriteErrorCount is not a function
Expected Behavior
Should either throw error or TypeScrip types are not correct, as getWriteErrorCount is not always available?
Metadata
Metadata
Assignees
Labels
No labels