diff --git a/desktop/app/src/init.tsx b/desktop/app/src/init.tsx index 028a36a0e..291cbe638 100644 --- a/desktop/app/src/init.tsx +++ b/desktop/app/src/init.tsx @@ -187,7 +187,7 @@ function init() { if (!isProduction()) { const msg = `[interaction] ${r.scope}:${r.action} in ${r.duration}ms`; if (r.success) console.log(msg); - else console.error(msg, r.error); + else console.warn(msg, r.error); } }); ReactDOM.render( diff --git a/desktop/flipper-plugin/src/ui/Tracked.tsx b/desktop/flipper-plugin/src/ui/Tracked.tsx index 88274b181..2dcf76e35 100644 --- a/desktop/flipper-plugin/src/ui/Tracked.tsx +++ b/desktop/flipper-plugin/src/ui/Tracked.tsx @@ -161,12 +161,16 @@ export function wrapInteractionHandler( throw e; } const initialEnd = Date.now(); - if (typeof res?.then === 'function') { + if (typeof res?.then === 'function' && typeof res?.catch === 'function') { // async / promise res.then( () => r(initialEnd), (error: any) => r(initialEnd, error), ); + res = res.catch((error: any) => { + // we need to create another rejected promise so error is again marked as "unhandled" + return Promise.reject(error); + }); } else { // not a Promise r(initialEnd);