Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1391

Ruby driver returns generic OpenSSL error message rather than the actual one

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.6.1
    • Affects Version/s: 2.6.0
    • Component/s: Auth
    • Labels:
      None

      The Ruby driver catches all OpenSSL-related errors and returns the generic "SSL handshake failed. MongoDB may not be configured with SSL support.". The actual error is discarded making debugging difficult.

      https://github.com/mongodb/mongo-ruby-driver/blob/master/lib/mongo/socket.rb#L288-L290

      We should pass back the inner error message so that it can be logged in a manner similar to the following:

      rescue OpenSSL::SSL::SSLError => e
        raise Mongo::Error::SocketError, "#{Mongo::Socket::SSL::SSL_ERROR} (#{e.message})"
      end
      

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            james.kovacs@mongodb.com James Kovacs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: