Skip to content
Browse files

Preserve the original exceptions when getting a web response.

  • Loading branch information...
1 parent 5253fb3 commit f32c0b08023c9dffb4af377d968564a7c1d32846 @ido-ran ido-ran committed Sep 26, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 LoveSeat/Support/CouchRequest.cs
View
4 LoveSeat/Support/CouchRequest.cs
@@ -154,11 +154,11 @@ public CouchRequest Data(Stream data)
return response;
} catch (WebException webEx) {
if (failedAuth == true) {
- throw webEx;
+ throw;
}
var response = (HttpWebResponse)webEx.Response;
if (response == null)
- throw new HttpException("Request failed to receive a response");
+ throw new HttpException("Request failed to receive a response", webEx);
return response;
}
throw new HttpException("Request failed to receive a response");

0 comments on commit f32c0b0

Please sign in to comment.
Something went wrong with that request. Please try again.