From edcf9f3fd575dc0f424489a7d70c678958c45e04 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 3 Jul 2023 17:07:00 +0100 Subject: [PATCH] Use the repsonse,.ok rather than manual status code check --- src/livekit/openIDSFU.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/livekit/openIDSFU.ts b/src/livekit/openIDSFU.ts index 9d46c51..e4d0d45 100644 --- a/src/livekit/openIDSFU.ts +++ b/src/livekit/openIDSFU.ts @@ -47,7 +47,7 @@ export async function getSFUConfigWithOpenID( device_id: client.getDeviceId(), }), }); - if (res.status / 100 !== 2) { + if (!res.ok) { throw new Error("SFO Config fetch failed with status code " + res.status); } const sfuConfig = await res.json();