summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElmer Thomas <elmer@thinkingserious.com>2015-11-16 20:18:43 -0800
committerElmer Thomas <elmer@thinkingserious.com>2015-11-16 20:18:43 -0800
commitfb6b2ddb9c0d3123c0bc5f89e1c7eb45516bab97 (patch)
tree01170235edd4a3c9932cdaef322947d4cc6ec8a5
parente312abe65e4aba68c4b814b9e8d09daa2e80f69b (diff)
downloadsendgrid-csharp-fb6b2ddb9c0d3123c0bc5f89e1c7eb45516bab97.zip
sendgrid-csharp-fb6b2ddb9c0d3123c0bc5f89e1c7eb45516bab97.tar.gz
sendgrid-csharp-fb6b2ddb9c0d3123c0bc5f89e1c7eb45516bab97.tar.bz2
Returned error should be consistent
via deckarep
-rw-r--r--SendGrid/SendGrid/Client.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/SendGrid/SendGrid/Client.cs b/SendGrid/SendGrid/Client.cs
index dbd3582..70a0f0d 100644
--- a/SendGrid/SendGrid/Client.cs
+++ b/SendGrid/SendGrid/Client.cs
@@ -75,7 +75,8 @@ namespace SendGrid
default:
HttpResponseMessage response = new HttpResponseMessage();
response.StatusCode = HttpStatusCode.MethodNotAllowed;
- response.Content = new StringContent("Bad method call: " + method);
+ var message = "{\"errors\":[{\"message\":\"Bad method call, supported methods are GET, POST, PATCH and DELETE\"}]}";
+ response.Content = new StringContent(message);
return response;
}
}