Add more detail to error message

This commit is contained in:
Schuyler Cebulskie
2016-11-27 19:39:10 -05:00
committed by GitHub
parent 8e7cb7fc4e
commit 769ea5b50f

View File

@@ -251,7 +251,7 @@ class ClientDataResolver {
req.end((err, res) => {
if (err) return reject(err);
if (this.client.browser) return resolve(convertArrayBuffer(res.xhr.response));
if (!(res.body instanceof Buffer)) return reject(new TypeError('Body is not a Buffer'));
if (!(res.body instanceof Buffer)) return reject(new TypeError('The response body isn\'t a Buffer.'));
return resolve(res.body);
});
} else {