Skip to content

Found a Bug in handling webhook of verifyWebhook() function #6283

@PrashanthKumar0

Description

@PrashanthKumar0

Preliminary Checks

Reproduction

https://gist.github.com/PrashanthKumar0/33bc544fa45e477921fc49df151adb0e

Publishable key

pk_test_c2tpbGxlZC1idWNrLTQ4LmNsZXJrLmFjY291bnRzLmRldiQ

Description

Steps to reproduce:

Just use verifyWebhook from "@clerk/express/webhooks" with proper environment setup with expressJS.

This is tiny little bug which I've already fixed.
I used debugger to step into library function this is the problematic line which resolves to '[Object object]' the cause being this line

it can be fixed with just single line of converting the body string from object type.

  const clonedRequest = new Request(webRequest, {
    body: JSON.stringify(req.body),
  });

I would love to send a pr and get it merged and this will be my first contribution to clerk so I'm really excited about it LMK how I should proceed.

Environment

System:
    OS: Windows 11 10.0.26100
    CPU: (12) x64 12th Gen Intel(R) Core(TM) i5-12450H
    Memory: 4.54 GB / 15.68 GB
  Binaries:
    Node: 20.18.0 - C:\Program Files\nodejs\node.EXE
    npm: 11.4.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (131.0.2903.86)
    Internet Explorer: 11.0.26100.1882
  npmPackages:
    @clerk/express: ^1.7.5 => 1.7.5
    @types/express: ^5.0.3 => 5.0.3
    @types/node: ^24.0.12 => 24.0.12
    dotenv: ^17.2.0 => 17.2.0
    express: ^5.1.0 => 5.1.0
    jest: ^30.0.4 => 30.0.4
    prisma: ^6.11.1 => 6.11.1
    svix: ^1.69.0 => 1.69.0
    tslib: ^2.8.1 => 2.8.1
    tsx: ^4.20.3 => 4.20.3
    typescript: ^5.8.3 => 5.8.3
    zod: ^4.0.2 => 4.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageA ticket that needs to be triaged by a team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions