-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Component/s: None
-
None
Soon – pretty very soon – MongoDB will be introducing new BSON types.
Although old drivers may not be connecting to MongoDB versions using that BSON types, bson dump files and whatnot will eventually contain these types and these files shoved through old driver versions.
Currently most drivers fail with very confusing error messages, especially if you are actually connected to a MongoDB supporting these types.
This ticket is about unifying this error message to be more friendly and possibly alerting the user that newer drivers may support this type and the BSON may not actually be corrupt as currently reported.
Detected unknown BSON type "\xTYPE" for fieldname "NAME". Are you using the latest driver version?
Where
- TYPE is the current field type
- NAME is the current field name, if possible
The type name should be represented in hex confirming to our BSON Spec convention '\x00'.
The field name may not be possible to include in drivers, but drivers SHOULD make BEST EFFORT to include it. It helps our users a great deal as they could potentially project that field out as a poor mans workaround.
It is not required to provide the fieldname using dotnotation for nested fields. The inner most fieldname is sufficient.
Please ensure this is done for all currently actively - AND INACTIVELY - maintained drivers.
- depends on
-
CDRIVER-1076 Rephrase unsupported/corrupt BSON messages
- Closed
-
CSHARP-1546 Rephrase unsupported/corrupt BSON messages
- Closed
-
PHPC-554 Rephrase unsupported/corrupt BSON messages
- Closed
-
PHPLIB-169 Rephrase unsupported/corrupt BSON messages
- Closed
-
PYTHON-1044 Improve error handling and messages for unknown BSON types
- Closed
-
RUBY-1084 Rephrase unsupported/corrupt BSON messages
- Closed
-
CXX-833 Rephrase unsupported/corrupt BSON messages
- Closed
-
RUST-217 Rephrase unsupported/corrupt BSON messages
- Closed
-
CXX-832 Friendlier error message when decoding Decimal128 BSONElements
- Closed
-
JAVA-2100 Rephrase unsupported/corrupt BSON messages
- Closed