From 73698e550c8acd2d57fb681d0673cfb5312fd443 Mon Sep 17 00:00:00 2001 From: Christian Koop Date: Fri, 24 Mar 2023 00:57:00 +0100 Subject: [PATCH] Fix Username -> UUID lookup to responde with 500 instead of 404 Looks like Mojang changed their API and now responds with 404 themself instead of 204. --- src/utils/mojang.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/mojang.ts b/src/utils/mojang.ts index 9a22058..9583b9f 100644 --- a/src/utils/mojang.ts +++ b/src/utils/mojang.ts @@ -13,7 +13,7 @@ export async function fetchUUID(username: string, at?: number): Promise { - if (result.res.status == 204) return resolve(null); + if (result.res.status == 204 || result.res.status == 404) return resolve(null); if (result.res.status == 200) { return resolve(JSON.parse(result.body.toString('utf-8')));