From 526e0ddd01f2b2388a0575d779f6cad5295b489b Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Tue, 25 May 2021 04:08:50 -0700 Subject: [PATCH] Demote console.error on check fail Summary: We use exception for control flow here which isn't great but we shouldn't log naked errors when a check fails. Reviewed By: nikoant Differential Revision: D28645636 fbshipit-source-id: db8c7b1457883acc767ac850f015f6b35a41730b --- desktop/doctor/src/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/desktop/doctor/src/index.ts b/desktop/doctor/src/index.ts index 5a347e6c8..19e7b2098 100644 --- a/desktop/doctor/src/index.ts +++ b/desktop/doctor/src/index.ts @@ -318,7 +318,10 @@ export async function runHealthchecks(): Promise< label, isRequired: isRequired ?? true, result: await run(environmentInfo).catch((e) => { - console.error(e); + console.warn( + `Health check ${key}/${label} failed with:`, + e, + ); // TODO Improve result type to be: OK | Problem(message, fix...) return { hasProblem: true,