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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d9c986fcf8
commit
526e0ddd01
@@ -318,7 +318,10 @@ export async function runHealthchecks(): Promise<
|
|||||||
label,
|
label,
|
||||||
isRequired: isRequired ?? true,
|
isRequired: isRequired ?? true,
|
||||||
result: await run(environmentInfo).catch((e) => {
|
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...)
|
// TODO Improve result type to be: OK | Problem(message, fix...)
|
||||||
return {
|
return {
|
||||||
hasProblem: true,
|
hasProblem: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user