diff --git a/src/Titanium.Web.Proxy/Helpers/HttpServerStream.cs b/src/Titanium.Web.Proxy/Helpers/HttpServerStream.cs index a4f08f99f..8376f19fe 100644 --- a/src/Titanium.Web.Proxy/Helpers/HttpServerStream.cs +++ b/src/Titanium.Web.Proxy/Helpers/HttpServerStream.cs @@ -39,7 +39,7 @@ internal async ValueTask ReadResponseStatus(CancellationToke { // is this really possible? httpStatus = await ReadLineAsync(cancellationToken) ?? - throw new ServerConnectionException("Server connection was closed."); + throw new ServerConnectionException("Server connection was closed. Response status is empty."); } Response.ParseResponseLine(httpStatus, out var version, out int statusCode, out string description); @@ -47,7 +47,7 @@ internal async ValueTask ReadResponseStatus(CancellationToke } catch (Exception e) when (!(e is ServerConnectionException)) { - throw new ServerConnectionException("Server connection was closed."); + throw new ServerConnectionException("Server connection was closed. Exception while reading the response status.", e); } } }