Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-1362

Confusing message in HttpHostConnectException

    XMLWordPrintableJSON

Details

    Description

      TCP connection can fail with two different kind of errors: 'Connection timed' out and 'Connection refused'. When a connection error occurs HttpClient catches SocketException and replaces it with HttpHostConnectException. In addition to exception class it replaces exception message, changing original text with 'Connection to ... refused'. This message is confusing because it looks very much like SocketException 'Connection refused', but in fact it hides original 'Connection timed out'.

      Consider using different messages in HttpHostConnectException depending on parent exception.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sergey-b Sergey B.
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: