diff options
author | Brandon West <brawest@gmail.com> | 2014-10-09 15:04:26 -0600 |
---|---|---|
committer | Brandon West <brawest@gmail.com> | 2014-10-09 15:04:26 -0600 |
commit | fc46788ff6da5e31559e0550607db735ecde4c2d (patch) | |
tree | f931777aa363c23af8207b789379c296d4894937 /SendGrid/SendGridMail/Exceptions/InvalidApiRequestException.cs | |
parent | d9a3ace4faefa9222c64db0f549285767209e8a6 (diff) | |
parent | 3779170bfcecbadc06a79d400cf5e2fdb070fca8 (diff) | |
download | sendgrid-csharp-fc46788ff6da5e31559e0550607db735ecde4c2d.zip sendgrid-csharp-fc46788ff6da5e31559e0550607db735ecde4c2d.tar.gz sendgrid-csharp-fc46788ff6da5e31559e0550607db735ecde4c2d.tar.bz2 |
Merge branch '0xdeafcafe-new-exceptions'
Diffstat (limited to 'SendGrid/SendGridMail/Exceptions/InvalidApiRequestException.cs')
-rw-r--r-- | SendGrid/SendGridMail/Exceptions/InvalidApiRequestException.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/SendGrid/SendGridMail/Exceptions/InvalidApiRequestException.cs b/SendGrid/SendGridMail/Exceptions/InvalidApiRequestException.cs new file mode 100644 index 0000000..7fd51ea --- /dev/null +++ b/SendGrid/SendGridMail/Exceptions/InvalidApiRequestException.cs @@ -0,0 +1,19 @@ +using System; +using System.Net; + +namespace Exceptions +{ + public class InvalidApiRequestException : Exception + { + public InvalidApiRequestException(HttpStatusCode httpStatusCode, string[] errors, string httpResponsePhrase) + : base(httpResponsePhrase + " Check `Errors` for a list of errors returned by the API.") + { + ResponseStatusCode = httpStatusCode; + Errors = errors; + } + + public String[] Errors { get; set; } + + public HttpStatusCode ResponseStatusCode { get; private set; } + } +} |