Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1453

mongo.NewClient does not return any error when providing invalid Mongo URI

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      Hello,

       

       

      const (
           MONGO_URL = "mongodb://ASASASAS"
      )
       
      func main() {
           client, err := mongo.NewClient(options.Client().ApplyURI(MONGO_URL))
           if err != nil {
               log.Fatal(err)
           }
      }
      

      This code should return error, as I'm providing an invalid URI. But it is not returning any error, which is confusing.

       

      Attachments

        Activity

          People

            divjot.arora@mongodb.com Divjot Arora (Inactive)
            cyantarek.cg@gmail.com cyan 3d
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: