mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 11:31:11 -05:00
Improve security and error handling in backend functions
Update Supabase functions for cancel-email-change, detect-location, send-escalation-notification, and upload-image to enhance security and implement robust error handling. Replit-Commit-Author: Agent Replit-Commit-Session-Id: a46bc7a0-bbf8-43ab-97c0-a58c66c2e365 Replit-Commit-Checkpoint-Type: intermediate_checkpoint
This commit is contained in:
@@ -213,7 +213,7 @@ serve(async (req) => {
|
||||
console.error('Error in send-escalation-notification:', error);
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
error: error.message,
|
||||
error: error instanceof Error ? error.message : 'Unknown error occurred',
|
||||
details: 'Failed to send escalation notification'
|
||||
}),
|
||||
{ status: 500, headers: { ...corsHeaders, 'Content-Type': 'application/json' } }
|
||||
|
||||
Reference in New Issue
Block a user