From 7d58037ad65286313e523a2793e8858233adfebf Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Mon, 30 Jan 2023 03:18:19 -0800 Subject: [PATCH] Improve errors around screen capture Summary: Tasks like T143443148 pop up frequently and are inactionable. This is usually due to device flakiness, storage being full, incompatibility or configuration problems. Start and stop were also copy-pasted to make matters worse. Reviewed By: ivanmisuno Differential Revision: D42800489 fbshipit-source-id: 11caaa4133e4fa1d773364a6ba4e5f5bb0d2f2ce --- desktop/flipper-ui-core/src/chrome/ScreenCaptureButtons.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop/flipper-ui-core/src/chrome/ScreenCaptureButtons.tsx b/desktop/flipper-ui-core/src/chrome/ScreenCaptureButtons.tsx index e42dc6732..b32028fee 100644 --- a/desktop/flipper-ui-core/src/chrome/ScreenCaptureButtons.tsx +++ b/desktop/flipper-ui-core/src/chrome/ScreenCaptureButtons.tsx @@ -45,7 +45,7 @@ export default function ScreenCaptureButtons() { setIsRecording(true); const videoPath = path.join(getCaptureLocation(), getFileName('mp4')); return selectedDevice.startScreenCapture(videoPath).catch((e) => { - console.error('Failed to start recording', e); + console.warn('Failed to start recording', e); message.error('Failed to start recording' + e); setIsRecording(false); }); @@ -58,8 +58,8 @@ export default function ScreenCaptureButtons() { } }) .catch((e) => { - console.error('Failed to start recording', e); - message.error('Failed to start recording' + e); + console.warn('Failed to stop recording', e); + message.error('Failed to stop recording' + e); }) .finally(() => { setIsRecording(false);