diff --git a/index.ts b/index.ts index 3cc9f44..f134d25 100644 --- a/index.ts +++ b/index.ts @@ -165,8 +165,9 @@ export async function handleWebhooks(config: WebhookRegistrationConfig, req: Req return await _handler(evt, handlerMap[evt.type] as HandlerFn) } - // If we don't have a handler for the event, return a 404 - return new Response('', { status: 404 }) + // If we don't have a handler for the event, still return 200 response or else + // the Clerk will keep retrying the event + return new Response('', { status: 200 }) } async function _handler(event: WebhookEvent, callback: Function): Promise { @@ -176,4 +177,4 @@ async function _handler(event: WebhookEvent, callback: Function): Promise