From 0c85da8651188764a41802417f53212133711ccd Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Mon, 17 Apr 2023 05:06:50 -0700 Subject: [PATCH] Demote unhelpful "Network Error" from axios to warning Summary: Axios can create rather unhelpful errors, e.g. https://www.internalfb.com/logview/details/flipper_javascript/3201603bcb7148a3f37775f184dbda44?trace_key=f2a7f3d0e7b914b8a3adf30648263313&selected-logview-tab=shared This should hopefully turn them into warnings. Reviewed By: antonk52 Differential Revision: D45043390 fbshipit-source-id: 90108b7056943214d78ec9c235ac11aae9a7ecdc --- desktop/flipper-ui-core/src/consoleLogTailer.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/desktop/flipper-ui-core/src/consoleLogTailer.tsx b/desktop/flipper-ui-core/src/consoleLogTailer.tsx index aff41ecb4..cbaa32f71 100644 --- a/desktop/flipper-ui-core/src/consoleLogTailer.tsx +++ b/desktop/flipper-ui-core/src/consoleLogTailer.tsx @@ -59,5 +59,10 @@ function transformLogLevel(level: LoggerTypes, message: string) { return 'warn'; } + // Axios will create rather unhelpful error messages which lead to unactionable tasks, e.g. T150636191 + if (level === 'error' && message.endsWith('Network Error')) { + return 'warn'; + } + return level; }