Make some error messages more helpful (#4177)
This commit is contained in:
@@ -191,7 +191,11 @@ function wrapToHTTPRequest(hook, key) {
|
|||||||
try {
|
try {
|
||||||
body = JSON.parse(body);
|
body = JSON.parse(body);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
err = { error: "Malformed response", code: -1 };
|
err = {
|
||||||
|
error: "Malformed response",
|
||||||
|
code: -1,
|
||||||
|
partialResponse: body.substring(0, 100)
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!err) {
|
if (!err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user