Skip to content

Fix webhook JSON body parsing#89

Open
Autowebassat-blip wants to merge 1 commit into
profullstack:masterfrom
Autowebassat-blip:fix-86-webhook-request-json
Open

Fix webhook JSON body parsing#89
Autowebassat-blip wants to merge 1 commit into
profullstack:masterfrom
Autowebassat-blip:fix-86-webhook-request-json

Conversation

@Autowebassat-blip

Copy link
Copy Markdown

Fixes #86.

The authenticated POST /api/webhooks handler receives an event object from withAuth, but the JSON parser was reading from an undefined request variable. That made valid JSON requests fall into the Invalid JSON catch path.

This changes the parser to read event.request.json(), matching the middleware contract.

Tests:

  • git diff --check
  • full test runner not run locally: pnpm is not available in PATH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

POST /api/webhooks rejects valid JSON because request is undefined in withAuth handler

1 participant