@@ -86,4 +86,14 @@ serve(wrapHandler('shoprenter-customers', async (req) => {
{ status: 200, headers: { ...corsHeaders, 'Content-Type': 'application/json' } }
)
+ } catch (error: any) {
+ console.error('[ShopRenter] Customers fetch error:', error)
+ return new Response(
+ JSON.stringify({
+ error: 'Failed to fetch customers',
+ message: error.message
+ }),
+ { status: 500, headers: { ...corsHeaders, 'Content-Type': 'application/json' } }
+ )
+ }
}))
@@ -86,4 +86,14 @@ serve(wrapHandler('shoprenter-orders', async (req) => {
+ console.error('[ShopRenter] Orders fetch error:', error)
+ error: 'Failed to fetch orders',