Skip to content

Handle invalid Telnyx webhook JSON#138

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/telnyx-invalid-json
Jul 10, 2026
Merged

Handle invalid Telnyx webhook JSON#138
ralyodio merged 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/telnyx-invalid-json

Conversation

@aiirvizionz

Copy link
Copy Markdown
Contributor

Summary

  • return a 400 response for malformed Telnyx SMS webhook JSON after signature verification succeeds
  • add a focused regression test that ensures bad JSON does not reach Supabase or email side effects

Validation

  • corepack pnpm exec vitest run --config %TEMP%/qryptchat-vitest-no-react.config.mjs src/app/api/webhooks/telnyx/sms/route.test.js
  • node --check src/app/api/webhooks/telnyx/sms/route.js
  • node --check src/app/api/webhooks/telnyx/sms/route.test.js
  • git diff --check

Note: the project default vitest.config.js currently fails to load locally because @vitejs/plugin-react imports an unexported vite/internal path. I used an equivalent temporary Vitest config without the React plugin for this API-only test.

@ralyodio ralyodio merged commit 63b32ff into profullstack:master Jul 10, 2026
8 checks passed
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.

2 participants