prevent failed version request from crashing table view

This commit is contained in:
shamsmosowi
2022-10-04 12:26:43 +02:00
parent 751fa29be9
commit 433ee68c2c

View File

@@ -117,8 +117,13 @@ export const rowyRunAtom = atom((get) => {
/** Store deployed Rowy Run version */
export const rowyRunVersionAtom = atom(async (get) => {
const rowyRun = get(rowyRunAtom);
const response = await rowyRun({ route: runRoutes.version });
return response.version as string | false;
try {
const response = await rowyRun({ route: runRoutes.version });
return response.version as string | false;
} catch (e) {
console.log(e);
return false;
}
});
/**