diff --git a/desktop/flipper-ui-core/src/utils/globalErrorHandling.tsx b/desktop/flipper-ui-core/src/utils/globalErrorHandling.tsx index d6336754c..4d5eb6f3b 100644 --- a/desktop/flipper-ui-core/src/utils/globalErrorHandling.tsx +++ b/desktop/flipper-ui-core/src/utils/globalErrorHandling.tsx @@ -9,8 +9,20 @@ export const startGlobalErrorHandling = () => { if (typeof window !== 'undefined') { - window.onerror = (event) => { - console.error('"onerror" event intercepted:', event); + window.onerror = ( + event: Event | string, + source?: string, + lineno?: number, + colno?: number, + error?: Error, + ) => { + console.error('"onerror" event intercepted:', event, { + source, + lineno, + colno, + error, + stack: (error as any)?.stack, + }); }; window.onunhandledrejection = (event) => { console.error('"unhandledrejection" event intercepted:', event.reason);