mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 08:51:13 -05:00
Fix remaining compliance violations
This commit is contained in:
@@ -85,11 +85,15 @@ Deno.serve(async (req) => {
|
||||
.rpc('cancel_user_email_change', { _user_id: userId });
|
||||
|
||||
if (cancelError || !cancelled) {
|
||||
console.error('Error cancelling email change:', cancelError);
|
||||
edgeLogger.error('Error cancelling email change', {
|
||||
error: cancelError?.message,
|
||||
userId,
|
||||
requestId: tracking.requestId
|
||||
});
|
||||
throw new Error('Unable to cancel email change: ' + (cancelError?.message || 'Unknown error'));
|
||||
}
|
||||
|
||||
console.log(`Successfully cancelled email change for user ${userId}`);
|
||||
edgeLogger.info('Successfully cancelled email change', { userId, requestId: tracking.requestId });
|
||||
|
||||
// Log the cancellation in admin_audit_log
|
||||
const { error: auditError } = await supabaseAdmin
|
||||
@@ -104,7 +108,10 @@ Deno.serve(async (req) => {
|
||||
});
|
||||
|
||||
if (auditError) {
|
||||
console.error('Error logging audit:', auditError);
|
||||
edgeLogger.error('Error logging audit', {
|
||||
error: auditError.message,
|
||||
requestId: tracking.requestId
|
||||
});
|
||||
// Don't fail the request if audit logging fails
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user