driver.Error prints its message twice for network errors

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Error Handling
    • None
    • Go Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Detailed steps to reproduce the problem?

      Can repro in the drivers package:

      func TestTwiceError(t *testing.T) {
      	inner := errors.New("connection(host:27017[-1] incomplete read of message header")
      	err := Operation{}.networkError(inner)
      	require.Equal(t, strings.Count(err.Error(), inner.Error()), 1)
      }
      

      Definition of done: what must be done to consider the task complete?

      • Message appears only once with no leading space
      • Unit test covering it

            Assignee:
            Unassigned
            Reporter:
            Preston Vasquez
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: