diff options
author | huli <aszx87410@gmail.com> | 2016-10-15 00:31:44 +0800 |
---|---|---|
committer | huli <aszx87410@gmail.com> | 2016-10-15 02:21:13 +0800 |
commit | be07582d6c0ce13ffb9ecd8f05016c896ba5e2ae (patch) | |
tree | a3207c311a5d60ad03a4e922006392de0a6261e2 | |
parent | d4110a1fbacd59275aa221ce369c9ad08118bb57 (diff) | |
download | sendgrid-nodejs-be07582d6c0ce13ffb9ecd8f05016c896ba5e2ae.zip sendgrid-nodejs-be07582d6c0ce13ffb9ecd8f05016c896ba5e2ae.tar.gz sendgrid-nodejs-be07582d6c0ce13ffb9ecd8f05016c896ba5e2ae.tar.bz2 |
Update nodejs-http-client dependency to v2.3.0, closes #317
-rw-r--r-- | TROUBLESHOOTING.md | 12 | ||||
-rw-r--r-- | package.json | 2 |
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", |