Browse Source

fix: add missing catch block in oauth-shoprenter-callback #65

Claude 5 months ago
parent
commit
cbf2152e8a
1 changed files with 7 additions and 0 deletions
  1. 7 0
      supabase/functions/oauth-shoprenter-callback/index.ts

+ 7 - 0
supabase/functions/oauth-shoprenter-callback/index.ts

@@ -254,4 +254,11 @@ serve(wrapHandler('oauth-shoprenter-callback', async (req) => {
       }
       }
     })
     })
 
 
+  } catch (error) {
+    console.error('[ShopRenter] OAuth callback error:', error)
+    return new Response(
+      JSON.stringify({ error: 'Failed to process OAuth callback' }),
+      { status: 500, headers: { ...corsHeaders, 'Content-Type': 'application/json' } }
+    )
+  }
 }))
 }))