mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-25 05:11:13 -05:00
Refactor: Implement logging and JSONB cleanup
This commit is contained in:
@@ -2,6 +2,7 @@ import { useState, useEffect } from 'react';
|
||||
import { supabase } from '@/integrations/supabase/client';
|
||||
import { TechnicalSpecFilter, CoasterStatFilter } from '@/components/search/AdvancedRideFilters';
|
||||
import { useDebounce } from './useDebounce';
|
||||
import { handleError } from '@/lib/errorHandler';
|
||||
|
||||
interface AdvancedSearchOptions {
|
||||
query?: string;
|
||||
@@ -151,7 +152,14 @@ export function useAdvancedRideSearch(options: AdvancedSearchOptions) {
|
||||
|
||||
setResults(filteredResults);
|
||||
} catch (err) {
|
||||
console.error('Advanced search error:', err);
|
||||
handleError(err, {
|
||||
action: 'Advanced Ride Search',
|
||||
metadata: {
|
||||
query: options.query,
|
||||
category: options.category,
|
||||
manufacturer: options.manufacturer
|
||||
}
|
||||
});
|
||||
setError(err instanceof Error ? err.message : 'Search failed');
|
||||
setResults([]);
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user