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;
}
let config;
try {
config = await resp.json();
} catch (err) {
return;
}
return {
url,
config: await resp.json()
config
};
}).catch(error => {
console.error(error);