|
|
@@ -373,4 +373,12 @@ serve(wrapHandler('webhooks-shopify', async (req) => {
|
|
|
{ status: 200, headers: { ...corsHeaders, 'Content-Type': 'application/json' } }
|
|
|
)
|
|
|
|
|
|
+ } catch (error) {
|
|
|
+ logError('webhooks-shopify', error as Error, { method: req.method })
|
|
|
+ return new Response(
|
|
|
+ JSON.stringify({ error: 'Internal server error' }),
|
|
|
+ { status: 500, headers: { ...corsHeaders, 'Content-Type': 'application/json' } }
|
|
|
+ )
|
|
|
+ }
|
|
|
}))
|
|
|
+
|