Use the repsonse,.ok rather than manual status code check
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user