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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor - P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      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)

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            alex.bevilacqua Alex Bevilacqua
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: