Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.

Commit ec5ff4d

Browse files
committed
better exception messages
1 parent a5a04e9 commit ec5ff4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Titanium.Web.Proxy/Helpers/HttpServerStream.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ internal async ValueTask<ResponseStatusInfo> ReadResponseStatus(CancellationToke
3939
{
4040
// is this really possible?
4141
httpStatus = await ReadLineAsync(cancellationToken) ??
42-
throw new ServerConnectionException("Server connection was closed.");
42+
throw new ServerConnectionException("Server connection was closed. Response status is empty.");
4343
}
4444

4545
Response.ParseResponseLine(httpStatus, out var version, out int statusCode, out string description);
4646
return new ResponseStatusInfo { Version = version, StatusCode = statusCode, Description = description };
4747
}
4848
catch (Exception e) when (!(e is ServerConnectionException))
4949
{
50-
throw new ServerConnectionException("Server connection was closed.");
50+
throw new ServerConnectionException("Server connection was closed. Exception while reading the response status.", e);
5151
}
5252
}
5353
}

0 commit comments

Comments
 (0)