Skip to content

Harden API JSON validation paths#137

Merged
ralyodio merged 2 commits into
profullstack:masterfrom
aiirvizionz:clientkit/qryptchat-qa-fixes
Jul 10, 2026
Merged

Harden API JSON validation paths#137
ralyodio merged 2 commits into
profullstack:masterfrom
aiirvizionz:clientkit/qryptchat-qa-fixes

Conversation

@aiirvizionz

Copy link
Copy Markdown
Contributor

What changed

Hardens several API routes so malformed or non-object JSON returns a clear 400 instead of falling into deeper route logic.

Covered routes:

  • src/app/api/auth/debug-sms/route.js
  • src/app/api/conversations/create/route.js
  • src/app/api/files/upload-url/route.js
  • src/app/api/files/upload-complete/route.js

Also adds focused regression tests for the validation paths.

Why

These are small QA hardening fixes for request validation. Invalid JSON/body shapes should fail at the boundary and avoid confusing downstream behavior.

Validation

  • npx vitest run src/app/api/files/upload-url/route.test.js src/app/api/files/upload-complete/route.test.js src/app/api/conversations/create/route.test.js --reporter=dot
  • node --check on changed route/test files
  • git diff --check

@ralyodio ralyodio merged commit b1904a0 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