diff options
author | Brandon West <brawest@gmail.com> | 2015-04-22 09:00:29 -0600 |
---|---|---|
committer | Brandon West <brawest@gmail.com> | 2015-04-22 09:00:29 -0600 |
commit | 142e30b0af624b750f693bb1bb0af83206037326 (patch) | |
tree | 0e00b25c5cdf6a6651402f873cd7bf50887edcde /SendGrid/SendGridMail | |
parent | 97bcb9854b8c8d3796b7b1dd56d2525fc8832057 (diff) | |
download | sendgrid-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.cs | 14 |
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))
|