summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--TROUBLESHOOTING.md12
-rw-r--r--package.json2
2 files changed, 10 insertions, 4 deletions
diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md
index 9a52789..ca93daf 100644
--- a/TROUBLESHOOTING.md
+++ b/TROUBLESHOOTING.md
@@ -80,9 +80,15 @@ To read the error message returned by SendGrid's API:
request.path = '/v3/mail/send'
request.body = requestBody
sg.API(request, function (error, response) {
- console.log(response.statusCode)
- console.log(response.body)
- console.log(response.headers)
+
+ if(error) {
+ console.log(error.message);
+ console.log(error.response.statusCode);
+ console.log(error.response.body);
+ console.log(error.response.headers);
+ } else {
+ console.log(response);
+ }
})
```
diff --git a/package.json b/package.json
index 8ca735e..2b2faa4 100644
--- a/package.json
+++ b/package.json
@@ -27,7 +27,7 @@
"bottleneck": "^1.12.0",
"debug": "^2.2.0",
"lodash.chunk": "^4.2.0",
- "sendgrid-rest": "^2.2.1"
+ "sendgrid-rest": "^2.3.0"
},
"devDependencies": {
"chai": "^3.5.0",