When using "variant" the IDL parser returns an unclear error message when parsing an invalid type. This issue can be reproduced within the idl_test.cpp file, which defines the following struct:
one_variant: description: UnitTest for a single variant which accepts int or string strict: false fields: value: type: variant: [int, string]
When setting the "value" field to an object type, the parser will throw the following error: "BSON field 'root.value' is the wrong type 'object', expected types '[']".
- is depended on by
-
SERVER-94318 Streams: Remove special logic added to improve the error thrown with an invalid '$emit.config.headers' field
- Needs Scheduling
- related to
-
SERVER-92197 Streams: Better error message for TypeMismatch: BSON field '$emit.config.headers' is the wrong type 'array', expected types '[']
- Closed