The .NET Framework HttpWebRequest.GetResponse() throws a WebException when the response's status code is HTTP 401. The actual response is contained in the Exception.
However, the getter of the Response property of HttpURLConnection does not try to catch this type of exception, which results in an unhandled WebException when HTTP authorization fails, instead of the expected JGitInternalException.
The .NET Framework HttpWebRequest.GetResponse() throws a WebException when the response's status code is HTTP 401. The actual response is contained in the Exception.
However, the getter of the Response property of HttpURLConnection does not try to catch this type of exception, which results in an unhandled WebException when HTTP authorization fails, instead of the expected JGitInternalException.