Make some error messages more helpful (#4177)

This commit is contained in:
Tyler Brock
2017-09-19 20:45:13 -07:00
committed by GitHub
parent 9371958a09
commit 70ca7bdd41

View File

@@ -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) {