Details
-
Bug
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
None
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
- is related to
-
HTTPCLIENT-1485 Wrong type of exception raised because of hardcoded string-compare
- Closed