aboutsummaryrefslogtreecommitdiff
path: root/build/mojang.js
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2021-06-24 15:38:49 -0500
committermat <github@matdoes.dev>2021-06-24 15:38:49 -0500
commitfe6fd11b44d57010dfb3bf702bc24fe5a5babb50 (patch)
treefd4e66e3a244677fb426d133fda5d29cda3156dd /build/mojang.js
parent8387ce2ad19068bf9c8299c193fdc0f5e933de6f (diff)
downloadskyblock-api-fe6fd11b44d57010dfb3bf702bc24fe5a5babb50.tar.gz
skyblock-api-fe6fd11b44d57010dfb3bf702bc24fe5a5babb50.tar.bz2
skyblock-api-fe6fd11b44d57010dfb3bf702bc24fe5a5babb50.zip
log the mojang error
Diffstat (limited to 'build/mojang.js')
-rw-r--r--build/mojang.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/build/mojang.js b/build/mojang.js
index 5216d39..c33445a 100644
--- a/build/mojang.js
+++ b/build/mojang.js
@@ -64,13 +64,14 @@ async function profileFromUsername(username) {
await new Promise((resolve) => setTimeout(resolve, 1000));
return await profileFromUsername(username);
}
- let data;
+ let data = null;
const rawData = await fetchResponse.text();
try {
data = JSON.parse(rawData);
}
catch { }
if (!(data === null || data === void 0 ? void 0 : data.id)) {
+ console.log('no id returned from mojang', rawData);
// return { uuid: null, username: null }
return await profileFromUsernameAlternative(username);
}