Skip to content

fix(auth): normalize invalid request bodies to HTTP 400 response (#11394) - #11650

Open
jihadMo wants to merge 1 commit into
SecureBananaLabs:mainfrom
jihadMo:fix/auth-endpoints-payload-validation-400
Open

fix(auth): normalize invalid request bodies to HTTP 400 response (#11394)#11650
jihadMo wants to merge 1 commit into
SecureBananaLabs:mainfrom
jihadMo:fix/auth-endpoints-payload-validation-400

Conversation

@jihadMo

@jihadMo jihadMo commented Aug 8, 2026

Copy link
Copy Markdown

Resolves #11394 (refs #743).

Catches ZodError payload validation failures in register and login handlers in apps/api/src/controllers/authController.js and returns HTTP 400 Bad Request instead of unhandled 500 errors, backed by unit test suite in apps/api/src/controllers/auth-payload-validation.test.js.

github-actions Bot added a commit that referenced this pull request Aug 8, 2026
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.

Bug: Auth endpoints should return 400 for invalid payloads

1 participant