-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: BSON
-
Labels:
Use Case
When Decimal128 is passed an integer rather than a string, instead of returning a type error, it seems to try and fail some copy operation. Either the input validation is incorrect or the error message is misleading.
Example:
Enterprise rs0 [direct: primary]> db.collection.find( { "value": Decimal128(12345.00) } )
TypeError: value.bytes.copy is not a function
Enterprise rs0 [direct: primary]> db.collection.find( { "value": Decimal128("12345.00") } )
[ { _id: 3, value: Decimal128("12345.00"), expType: 'Decimal128' } ]
Dependencies
- mongosh
Unknowns
Acceptance Criteria
Implementation Requirements
- functional reqs, potential snafus to avoid, performance targets, etc
Testing Requirements
- unit test, spec test sync, etc
Documentation Requirements
- DOCSP ticket, API docs, etc
Follow Up Requirements
- additional tickets to file, required releases, etc