-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Error
Raising this ticket specifically for the error raised when an invalid compressor is supplied, however it may be beneficial to align all connection parsing errors in a similar fashion.
For example, in the 3.6 Driver the error is:
throw new MongoParseError( 'Value for `compressors` must be at least one of: `snappy`, `zlib`' );
whereas in the 4.0 Driver the error is:
throw new MongoParseError(`${c} is not a valid compression mechanism`);
Ideally these errors would consistently include both:
- the invalid value that was passed
- the list of accepted values (where appropriate)