mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-25 02:51:13 -05:00
Fix remaining production readiness issues
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { supabase } from '@/integrations/supabase/client';
|
||||
import { logger } from '@/lib/logger';
|
||||
import { getErrorMessage } from '@/lib/errorHandler';
|
||||
|
||||
interface EmailValidationResult {
|
||||
valid: boolean;
|
||||
@@ -17,7 +19,10 @@ export async function validateEmailNotDisposable(email: string): Promise<EmailVa
|
||||
});
|
||||
|
||||
if (error) {
|
||||
console.error('Email validation error:', error);
|
||||
logger.error('Email validation error from backend', {
|
||||
action: 'validate_email_backend',
|
||||
error: error.message
|
||||
});
|
||||
return {
|
||||
valid: false,
|
||||
reason: 'Unable to validate email address. Please try again.'
|
||||
@@ -25,8 +30,12 @@ export async function validateEmailNotDisposable(email: string): Promise<EmailVa
|
||||
}
|
||||
|
||||
return data as EmailValidationResult;
|
||||
} catch (error) {
|
||||
console.error('Email validation exception:', error);
|
||||
} catch (error: unknown) {
|
||||
const errorMsg = getErrorMessage(error);
|
||||
logger.error('Email validation error', {
|
||||
action: 'validate_email_disposable',
|
||||
error: errorMsg
|
||||
});
|
||||
return {
|
||||
valid: false,
|
||||
reason: 'Unable to validate email address. Please try again.'
|
||||
|
||||
Reference in New Issue
Block a user