mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 15:51:12 -05:00
Fix imports and test flow
This commit is contained in:
33
src/test-error-logging.tsx
Normal file
33
src/test-error-logging.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Temporary test component to verify error logging system
|
||||
* Delete this file after testing
|
||||
*/
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { handleError } from '@/lib/errorHandler';
|
||||
import { supabase } from '@/lib/supabaseClient';
|
||||
|
||||
export function TestErrorLogging() {
|
||||
const testError = () => {
|
||||
try {
|
||||
throw new Error('Test error for logging system verification');
|
||||
} catch (error) {
|
||||
handleError(error, {
|
||||
action: 'Test Error Logging',
|
||||
metadata: { test: true }
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const testApiCall = async () => {
|
||||
// This will generate breadcrumbs via the wrapped client
|
||||
await supabase.from('parks').select('id').limit(1);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="p-4 space-y-4">
|
||||
<h2 className="text-xl font-bold">Error Logging Test</h2>
|
||||
<Button onClick={testError}>Generate Test Error</Button>
|
||||
<Button onClick={testApiCall} variant="outline">Test API Breadcrumbs</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user