mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-25 16:19:20 -04:00
Correctly log uncaught errors/unhandled promises (#3857)
This commit is contained in:
1 parent
a12ccc3faf
commit
cecd95f0d7
1 file changed
+2
-2
@@ -68,11 +68,11 @@ window['styled-components'] = styledComponents;
|
||||
// Catch uncaught errors and report them
|
||||
if (window && !isDevelopment()) {
|
||||
window.addEventListener('error', e => {
|
||||
console.error('Uncaught Error', e);
|
||||
console.error('Uncaught Error', e.error || e);
|
||||
trackEvent('Error', 'Uncaught Error');
|
||||
});
|
||||
window.addEventListener('unhandledrejection', e => {
|
||||
console.error('Unhandled Promise', e);
|
||||
console.error('Unhandled Promise', e.reason);
|
||||
trackEvent('Error', 'Uncaught Promise');
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user