1
0
Fork 0

more debug output

This commit is contained in:
Frank Celler 2018-10-25 17:27:18 +02:00
parent 8564a08bbb
commit 5db8528beb
1 changed files with 4 additions and 2 deletions

View File

@ -435,9 +435,11 @@ function MovingShardsWithViewSuite (options) {
throw err;
}
const body = res.body;
if (typeof body !== "string") {
const type = typeof body;
if (type !== "string") {
const info = JSON.stringify(res);
console.error(`Error after GET ${url}; body is not a string`);
throw new Error("body is not a string");
throw new Error(`Error after GET ${url}; body is not a string, but a ${type}: ${info}`);
}
const parsedBody = JSON.parse(body);