From 38ba5c839d68a17b9b63ccb0fb3b643e2a960f4a Mon Sep 17 00:00:00 2001 From: Rhys Parry Date: Wed, 29 Apr 2026 03:23:12 +0000 Subject: [PATCH] Classify Windows TCP connect timeout as a network error On Windows 2019, connecting to a port with no listener can result in a connection timeout rather than an immediate RST, producing the message "The client was unable to establish the initial connection within the timeout". This string was missing from the IsNetworkError recogniser, causing it to fall through to UnknownError on Windows CI runs. Co-Authored-By: Claude Sonnet 4.6 --- .../ExceptionReturnedByHalibutProxyExtensionMethod.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/Halibut/Diagnostics/ExceptionReturnedByHalibutProxyExtensionMethod.cs b/source/Halibut/Diagnostics/ExceptionReturnedByHalibutProxyExtensionMethod.cs index 9c0a6014..138bf5da 100644 --- a/source/Halibut/Diagnostics/ExceptionReturnedByHalibutProxyExtensionMethod.cs +++ b/source/Halibut/Diagnostics/ExceptionReturnedByHalibutProxyExtensionMethod.cs @@ -115,7 +115,8 @@ public static HalibutNetworkExceptionType IsNetworkError(this Exception exceptio if (exception.Message.Contains("The remote party closed the WebSocket connection without completing the close handshake.")) return HalibutNetworkExceptionType.IsNetworkError; if (exception.Message.Contains("Unable to read data from the transport connection: Operation timed out.")) return HalibutNetworkExceptionType.IsNetworkError; if (exception.Message.Contains("Unable to write data to the transport connection: Operation timed out.")) return HalibutNetworkExceptionType.IsNetworkError; - + if (exception.Message.Contains("The client was unable to establish the initial connection within the timeout")) return HalibutNetworkExceptionType.IsNetworkError; + } return HalibutNetworkExceptionType.UnknownError;