diff --git a/tailscale-whoami/whoami.ts b/tailscale-whoami/whoami.ts index 253c5fa..b37271c 100644 --- a/tailscale-whoami/whoami.ts +++ b/tailscale-whoami/whoami.ts @@ -28,11 +28,13 @@ const whoami = async (ip: string): Promise => { }, ); - const devices = await jsonResponse.json() as DevicesResponse; + const body = await jsonResponse.text(); + + const devices = JSON.parse(body) as DevicesResponse; if (!devices || !devices.devices) { console.log(`Unexpected devices response`); - console.log(await jsonResponse.text()); + console.log(body); return; }