Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3218

Consistent error message in 3.6 and 4.0 for connection string parsing

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.8.0
    • Affects Version/s: None
    • Component/s: Error
    • 2
    • Not Needed

      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)

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            alex.bevilacqua@mongodb.com Alex Bevilacqua
            Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: