mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 09:51:13 -05:00
Improve error handling and navigation safety across the application
Add robust error handling for image uploads, improve navigation logic in AutocompleteSearch with toast notifications for missing identifiers, refine useIsMobile hook return type, and update Supabase function error reporting to handle non-Error types. Replit-Commit-Author: Agent Replit-Commit-Session-Id: a759d451-40bf-440d-96f5-a19ad6af18a8 Replit-Commit-Checkpoint-Type: intermediate_checkpoint
This commit is contained in:
@@ -230,7 +230,7 @@ serve(async (req) => {
|
||||
itemId: item.id,
|
||||
itemType: item.item_type,
|
||||
success: false,
|
||||
error: error.message
|
||||
error: error instanceof Error ? error.message : 'Unknown error'
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -261,7 +261,7 @@ serve(async (req) => {
|
||||
} catch (error) {
|
||||
console.error('Error in process-selective-approval:', error);
|
||||
return new Response(
|
||||
JSON.stringify({ error: error.message }),
|
||||
JSON.stringify({ error: error instanceof Error ? error.message : 'Unknown error' }),
|
||||
{ status: 500, headers: { ...corsHeaders, 'Content-Type': 'application/json' } }
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user