@@ -576,4 +576,14 @@ serve(wrapHandler('shoprenter-sync', async (req) => {
{ status: 200, headers: { ...corsHeaders, 'Content-Type': 'application/json' } }
)
+ } catch (error: any) {
+ console.error('[ShopRenter] Sync error:', error)
+ return new Response(
+ JSON.stringify({
+ error: 'Sync failed',
+ message: error.message
+ }),
+ { status: 500, headers: { ...corsHeaders, 'Content-Type': 'application/json' } }
+ )
+ }
}))