From a5a520be060a87769fb2e3616774d2a7f0285dc3 Mon Sep 17 00:00:00 2001 From: Rory& Date: Wed, 3 Dec 2025 20:00:26 +0100 Subject: [PATCH] wtf is wrong with ipdata --- src/api/routes/auth/register.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/api/routes/auth/register.ts b/src/api/routes/auth/register.ts index 5997b33fa..418f0a529 100644 --- a/src/api/routes/auth/register.ts +++ b/src/api/routes/auth/register.ts @@ -143,6 +143,9 @@ router.post( const ipData = await IpDataClient.getIpInfo(ip); if (ipData) { + if(!ipData.threat) { + console.log("Invalid IPData.co response, missing threat field", ipData); + } const categories = Object.entries(ipData.threat) .filter(([key, value]) => key.startsWith("is_") && value === true) .map(([key]) => key.replace("is_", ""));