Skip to content

Return 400 for invalid validated payloads#4197

Open
yZangEren wants to merge 2 commits into
SecureBananaLabs:mainfrom
yZangEren:fix-zod-validation-response
Open

Return 400 for invalid validated payloads#4197
yZangEren wants to merge 2 commits into
SecureBananaLabs:mainfrom
yZangEren:fix-zod-validation-response

Conversation

@yZangEren

@yZangEren yZangEren commented Jun 4, 2026

Copy link
Copy Markdown

Summary

  • Return controlled 400 JSON responses for invalid registration, login, and job creation payloads
  • Switch validated controllers from throwing parse calls to safeParse branches
  • Add focused API tests for the invalid payload paths

Tests

  • node --test src\tests\validation.test.js src\tests\health.test.js
  • git diff --check

Closes #4192
Refs #743

/claim #743

Demo

github-actions Bot added a commit that referenced this pull request Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validated API routes should return 400 for invalid payloads

1 participant