Approve database migration

This commit is contained in:
gpt-engineer-app[bot]
2025-11-03 15:18:06 +00:00
parent 5612d19d07
commit a86da6e833
17 changed files with 1189 additions and 36 deletions

View File

@@ -49,15 +49,19 @@ export class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundarySt
}
componentDidCatch(error: Error, errorInfo: ErrorInfo) {
// Generate error ID for user reference
const errorId = crypto.randomUUID();
// Log error with context
logger.error('Component error caught by boundary', {
context: this.props.context || 'unknown',
error: error.message,
stack: error.stack,
componentStack: errorInfo.componentStack,
errorId,
});
this.setState({ errorInfo });
this.setState({ errorInfo, error: { ...error, errorId } as any });
this.props.onError?.(error, errorInfo);
}
@@ -101,6 +105,11 @@ export class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundarySt
<p className="text-sm mt-2">
{this.state.error?.message || 'An unexpected error occurred'}
</p>
{(this.state.error as any)?.errorId && (
<p className="text-xs mt-2 font-mono bg-destructive/10 px-2 py-1 rounded">
Reference ID: {((this.state.error as any).errorId as string).slice(0, 8)}
</p>
)}
</AlertDescription>
</Alert>