mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
Add more detail to error message
This commit is contained in:
committed by
GitHub
parent
8e7cb7fc4e
commit
769ea5b50f
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user