summaryrefslogtreecommitdiffstats
path: root/SendGrid/SendGridMail
diff options
context:
space:
mode:
authorBrandon West <brawest@gmail.com>2015-04-22 09:00:29 -0600
committerBrandon West <brawest@gmail.com>2015-04-22 09:00:29 -0600
commit142e30b0af624b750f693bb1bb0af83206037326 (patch)
tree0e00b25c5cdf6a6651402f873cd7bf50887edcde /SendGrid/SendGridMail
parent97bcb9854b8c8d3796b7b1dd56d2525fc8832057 (diff)
downloadsendgrid-csharp-142e30b0af624b750f693bb1bb0af83206037326.zip
sendgrid-csharp-142e30b0af624b750f693bb1bb0af83206037326.tar.gz
sendgrid-csharp-142e30b0af624b750f693bb1bb0af83206037326.tar.bz2
remove synchronous CheckForErrors()
Diffstat (limited to 'SendGrid/SendGridMail')
-rw-r--r--SendGrid/SendGridMail/Transport/Web.cs14
1 files changed, 0 insertions, 14 deletions
diff --git a/SendGrid/SendGridMail/Transport/Web.cs b/SendGrid/SendGridMail/Transport/Web.cs
index 58f54ee..6f01b11 100644
--- a/SendGrid/SendGridMail/Transport/Web.cs
+++ b/SendGrid/SendGridMail/Transport/Web.cs
@@ -112,20 +112,6 @@ namespace SendGrid
}
}
- private static void CheckForErrors(HttpResponseMessage response)
- {
- var content = response.Content.ReadAsStreamAsync().Result;
- var errors = GetErrorsInResponse(content);
-
- // API error
- if (errors.Any())
- throw new InvalidApiRequestException(response.StatusCode, errors, response.ReasonPhrase);
-
- // Other error
- if (response.StatusCode != HttpStatusCode.OK)
- FindErrorsInResponse(content);
- }
-
private static void FindErrorsInResponse(Stream content)
{
using (var reader = XmlReader.Create(content))