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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
36934436c8
commit
0c85da8651
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user