From 2d253b13877c48efa082e3fd1e8984643257eaa0 Mon Sep 17 00:00:00 2001 From: Anton Kastritskiy Date: Fri, 10 Nov 2023 08:03:34 -0800 Subject: [PATCH] fix displayed error in virtual device picker Summary: Error thrown from server is serialiased that is a string, not instance of Error Reviewed By: LukeDefeo Differential Revision: D51201870 fbshipit-source-id: 833818789a50a21d3d27e0388635e0e2b7470c9d --- .../src/sandy-chrome/appinspect/LaunchEmulator.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/flipper-ui-core/src/sandy-chrome/appinspect/LaunchEmulator.tsx b/desktop/flipper-ui-core/src/sandy-chrome/appinspect/LaunchEmulator.tsx index 894c23f4d..2bf708c89 100644 --- a/desktop/flipper-ui-core/src/sandy-chrome/appinspect/LaunchEmulator.tsx +++ b/desktop/flipper-ui-core/src/sandy-chrome/appinspect/LaunchEmulator.tsx @@ -126,7 +126,7 @@ export const LaunchEmulatorDialog = withTrackingScope( setIosEmulators(simulators); } catch (error) { console.warn('Failed to find iOS simulators', error); - setiOSMessage(`Error: ${error.message} \nRetrying...`); + setiOSMessage(`Error: ${error.message ?? error} \nRetrying...`); setTimeout(getiOSSimulators, 1000); } }; @@ -148,7 +148,7 @@ export const LaunchEmulatorDialog = withTrackingScope( setAndroidEmulators(emulators); } catch (error) { console.warn('Failed to find Android emulators', error); - setAndroidMessage(`Error: ${error.message} \nRetrying...`); + setAndroidMessage(`Error: ${error.message ?? error} \nRetrying...`); setTimeout(getAndroidEmulators, 1000); } };