aboutsummaryrefslogtreecommitdiff
path: root/build/mojang.js
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2021-06-24 15:43:59 -0500
committermat <github@matdoes.dev>2021-06-24 15:43:59 -0500
commita6d6be848b1713153f5efcfe163d01e2a16ca77f (patch)
tree7793a7368b5ec97a9292f6287235684027634104 /build/mojang.js
parentfe6fd11b44d57010dfb3bf702bc24fe5a5babb50 (diff)
downloadskyblock-api-a6d6be848b1713153f5efcfe163d01e2a16ca77f.tar.gz
skyblock-api-a6d6be848b1713153f5efcfe163d01e2a16ca77f.tar.bz2
skyblock-api-a6d6be848b1713153f5efcfe163d01e2a16ca77f.zip
why is it broken?????
Diffstat (limited to 'build/mojang.js')
-rw-r--r--build/mojang.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/build/mojang.js b/build/mojang.js
index c33445a..86e44d8 100644
--- a/build/mojang.js
+++ b/build/mojang.js
@@ -33,7 +33,8 @@ async function profileFromUuid(uuid) {
try {
dataString = await fetchResponse.text();
}
- catch {
+ catch (err) {
+ console.log('failed reading response text', err);
return { uuid: null, username: null };
}
let data;
@@ -45,8 +46,7 @@ async function profileFromUuid(uuid) {
// if it errors, just return null
return { uuid: null, username: null };
}
- if (!data.id)
- console.log('mojang response:', data);
+ console.log('mojang response:', data);
return {
uuid: data.id,
username: data.name
@@ -71,7 +71,6 @@ async function profileFromUsername(username) {
}
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);
}