Rethrowing Web Exception

Merged
#15 · Created  · Last updated

Merged pull request

Merged in feature/GetResponseWithoutException-Issue (pull request #15)

d969510·Author: ·Closed by: ·2017-10-03

Description

WebException::Response can be null according to the MSDN documentation. (https://msdn.microsoft.com/en-us/library/system.net.webexception.response(v=vs.110).aspx)

When the SDK uses the GetResponsewithoutException extension method, it is not expecting a null value to be returned. In all cases, it immediately calls the StatusCode property on the returned value. This causes a Null Reference exception, which masks the more helpful details of the original WebException.

This change rethrows the WebException if no Response is provided.

0 attachments

0 comments

Loading commits...