From 70ca7bdd419f3ed403fbcee4848c6863b470bb0b Mon Sep 17 00:00:00 2001 From: Tyler Brock Date: Tue, 19 Sep 2017 20:45:13 -0700 Subject: [PATCH] Make some error messages more helpful (#4177) --- src/Controllers/HooksController.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Controllers/HooksController.js b/src/Controllers/HooksController.js index 28062696..6fcdfc3c 100644 --- a/src/Controllers/HooksController.js +++ b/src/Controllers/HooksController.js @@ -191,7 +191,11 @@ function wrapToHTTPRequest(hook, key) { try { body = JSON.parse(body); } catch (e) { - err = { error: "Malformed response", code: -1 }; + err = { + error: "Malformed response", + code: -1, + partialResponse: body.substring(0, 100) + }; } } if (!err) {