summaryrefslogtreecommitdiffstats
path: root/SendGrid/SendGridMail/Transport/Web.cs
diff options
context:
space:
mode:
authorBrandon West <brawest@gmail.com>2013-01-10 13:40:31 -0700
committerBrandon West <brawest@gmail.com>2013-01-10 13:40:31 -0700
commit8db29e02453275717680ca58202cef4acf9ca61e (patch)
tree3a819bb2ebead49b060e8e729206ad3a83af1e96 /SendGrid/SendGridMail/Transport/Web.cs
parent018955ce2bbc9dfa9f2b00744c33bc9442d0df72 (diff)
downloadsendgrid-csharp-8db29e02453275717680ca58202cef4acf9ca61e.zip
sendgrid-csharp-8db29e02453275717680ca58202cef4acf9ca61e.tar.gz
sendgrid-csharp-8db29e02453275717680ca58202cef4acf9ca61e.tar.bz2
change web.CheckForErrors to handle response from mail.send
Diffstat (limited to 'SendGrid/SendGridMail/Transport/Web.cs')
-rwxr-xr-xSendGrid/SendGridMail/Transport/Web.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/SendGrid/SendGridMail/Transport/Web.cs b/SendGrid/SendGridMail/Transport/Web.cs
index 5a27469..7015653 100755
--- a/SendGrid/SendGridMail/Transport/Web.cs
+++ b/SendGrid/SendGridMail/Transport/Web.cs
@@ -107,7 +107,11 @@ namespace SendGridMail.Transport
case "result":
break;
case "message": // success
- return;
+ bool errors = reader.ReadToNextSibling("errors");
+ if (errors)
+ throw new ProtocolViolationException(status);
+ else
+ return;
case "error": // failure
throw new ProtocolViolationException(status);
default: