-
Type: Bug
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
What problem are you facing?
I have a bulkWrite operation that worked perfectly with MongoDB 4.4 / Mongo Client 3.5. But after upgrading to MongoDB 5 / Mongo Client 4.1.2 it doesn't.
The issue is, when I have a replaceOne operation in a bulkWrite that violates unique index constraint, I used to get an error describing the index name that causes the conflict. In the new setup I'm just getting this "Invalid UTF-8 string in BSON document" error. If I go, and comment out BSON parser's desiriazer.js around line 100 where you check that 0xfffd (the whole for block), everything works perfectly I'm getting the correct error message again.
So I believe this error is not a user error. The client has issues while parsing valid MongoDB error messages.
What driver and relevant dependency versions are you using?
MongoDB client 4.1.2
MongoDB 5.0
Steps to reproduce?
See description.
- depends on
-
NODE-3740 Implement root and top level key utf-8 validation settings for BSON
- Closed
- is duplicated by
-
NODE-3644 Decouple user data BSON and server protocol BSON parsing
- Closed
- is related to
-
DRIVERS-2008 Default to lossy/replacement behavior when decoding UTF-8 in writeErrors
- Backlog
- related to
-
SERVER-24007 Server can return invalid UTF8 for error messages due to truncation in the middle of a code point
- Backlog
-
DRIVERS-1936 Drivers should have option to disable UTF-8 validation for BSON strings
- Backlog
- mentioned in
-
Page Loading...