Faro & grafana improvements
Run Tests on Branches / Detect Changes (push) Successful in 8s
Run Tests on Branches / Backend Tests (push) Has been skipped
Run Tests on Branches / Frontend Tests (push) Successful in 1m46s
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled

This commit is contained in:
Antoni Nuñez Romeu
2026-07-07 23:40:04 +02:00
parent aae3ac04af
commit 6612c8b10c
5 changed files with 99 additions and 13 deletions
+12 -1
View File
@@ -1,6 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import ErrorBoundary from './components/ErrorBoundary';
import './index.css';
import { initNativeShell } from './utils/native';
import { initFaro } from './utils/faro';
@@ -9,9 +10,19 @@ import { initFaro } from './utils/faro';
// No-op if VITE_FARO_ENDPOINT is not configured.
initFaro();
// Global unhandled promise rejection handler — report to Faro
window.addEventListener('unhandledrejection', (event) => {
console.warn('[unhandledrejection]', event.reason);
try {
window.__faro?.api?.pushError(event.reason, { type: 'unhandled-rejection' });
} catch { /* Faro must never break the app */ }
});
ReactDOM.createRoot(document.getElementById('root')).render(
<React.StrictMode>
<App />
<ErrorBoundary>
<App />
</ErrorBoundary>
</React.StrictMode>
);