Handle json parse error when testing urls

This commit is contained in:
Bill Thornton 2023-10-20 13:48:03 -04:00
parent c0fb9eca82
commit 85e05d595d

View File

@ -56,9 +56,16 @@ export async function serverAddress() {
return; return;
} }
let config;
try {
config = await resp.json();
} catch (err) {
return;
}
return { return {
url, url,
config: await resp.json() config
}; };
}).catch(error => { }).catch(error => {
console.error(error); console.error(error);