mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-30 03:27:06 -05:00
feat: Implement final error coverage
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { supabase } from '@/lib/supabaseClient';
|
||||
import { logger } from './logger';
|
||||
import { handleError } from './errorHandler';
|
||||
|
||||
/**
|
||||
* Generate a URL-safe slug from a name
|
||||
@@ -51,7 +51,10 @@ export async function ensureUniqueSlug(
|
||||
const { data, error } = await query.limit(1);
|
||||
|
||||
if (error) {
|
||||
logger.error('Error checking slug uniqueness', { error, tableName });
|
||||
handleError(error, {
|
||||
action: 'Check Slug Uniqueness',
|
||||
metadata: { tableName, slug }
|
||||
});
|
||||
throw error;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user