All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m57s
- Backend: DRF custom exception handler → Log Center (async, non-blocking) - Frontend: global error handlers + axios 5xx interceptor → Log Center - CI/CD: failure step reports build/deploy errors with actual logs - K8S: add LOG_CENTER env vars to backend deployment - Registered projects: video_backend, video_web
24 lines
689 B
TypeScript
24 lines
689 B
TypeScript
import React from 'react';
|
|
import ReactDOM from 'react-dom/client';
|
|
import App from './App';
|
|
import './index.css';
|
|
import { reportError } from './lib/logCenter';
|
|
|
|
// Global error handlers — report to Log Center
|
|
window.onerror = (_message, source, lineno, colno, error) => {
|
|
if (error) reportError(error, { source, lineno, colno });
|
|
};
|
|
|
|
window.onunhandledrejection = (event: PromiseRejectionEvent) => {
|
|
const error = event.reason instanceof Error
|
|
? event.reason
|
|
: new Error(String(event.reason));
|
|
reportError(error, { type: 'unhandledrejection' });
|
|
};
|
|
|
|
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
<React.StrictMode>
|
|
<App />
|
|
</React.StrictMode>,
|
|
);
|