Use node driver's error reason to improve connection error messages

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Duplicate
    • Priority: Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed

      Discussed with alena.khineika in a recent PR for COMPASS-3991:

      Since driver retries to connect until it fails by timeout the type of the error will be always the timeout error. To provide extra information driver returns a new error property called reason. For example, in case of failures, the error message can be MongoTimeoutError: Server selection timed out after 1000 ms and error reason Error: connect ECONNREFUSED 127.0.0.1:29384.

      See Slack thread on pain that we no longer translate error messages from the driver that this small fix would help with.
      https://mongodb.slack.com/archives/C0U7K0MC3/p1575908041335500

      Related:

            Assignee:
            Unassigned
            Reporter:
            Lucas Hrabovsky (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: