mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-25 01:11:13 -05:00
Implement Phase 3C error logging
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { supabase } from '@/lib/supabaseClient';
|
||||
import { invokeWithTracking } from '@/lib/edgeFunctionTracking';
|
||||
import { logger } from '@/lib/logger';
|
||||
import { getErrorMessage } from '@/lib/errorHandler';
|
||||
import { handleNonCriticalError } from '@/lib/errorHandler';
|
||||
|
||||
interface EmailValidationResult {
|
||||
valid: boolean;
|
||||
@@ -22,9 +21,8 @@ export async function validateEmailNotDisposable(email: string): Promise<EmailVa
|
||||
);
|
||||
|
||||
if (error) {
|
||||
logger.error('Email validation error from backend', {
|
||||
action: 'validate_email_backend',
|
||||
error: error.message
|
||||
handleNonCriticalError(error, {
|
||||
action: 'Validate email backend',
|
||||
});
|
||||
return {
|
||||
valid: false,
|
||||
@@ -34,10 +32,8 @@ export async function validateEmailNotDisposable(email: string): Promise<EmailVa
|
||||
|
||||
return data as EmailValidationResult;
|
||||
} catch (error: unknown) {
|
||||
const errorMsg = getErrorMessage(error);
|
||||
logger.error('Email validation error', {
|
||||
action: 'validate_email_disposable',
|
||||
error: errorMsg
|
||||
handleNonCriticalError(error, {
|
||||
action: 'Validate email disposable',
|
||||
});
|
||||
return {
|
||||
valid: false,
|
||||
|
||||
Reference in New Issue
Block a user