Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-2242

Change IsConnectionError to cast to mongo.CommandError

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.10
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Not Needed

      mgo's Error function for command errors returned just the error message. The new driver returns "(Name) message", which causes some checks in the mongo-tools-common/db/db.go IsConnectionError function to fail.

      Change this to cast err to a mongo.CommandError and get the message from that.

            Assignee:
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Reporter:
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: