Fix remaining production readiness issues

This commit is contained in:
gpt-engineer-app[bot]
2025-10-20 12:30:09 +00:00
parent 640fdb11db
commit 4983960138
7 changed files with 158 additions and 91 deletions

View File

@@ -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.'