Skip to content

Handle auth and job validation errors#4295

Open
bozicovichsantiago20-oss wants to merge 1 commit into
SecureBananaLabs:mainfrom
bozicovichsantiago20-oss:codex/handle-zod-validation-errors
Open

Handle auth and job validation errors#4295
bozicovichsantiago20-oss wants to merge 1 commit into
SecureBananaLabs:mainfrom
bozicovichsantiago20-oss:codex/handle-zod-validation-errors

Conversation

@bozicovichsantiago20-oss

Copy link
Copy Markdown

Summary

  • replace auth/job schema.parse() calls with safeParse()
  • return explicit 400 responses for invalid registration, login, and job payloads
  • add route-level regression tests proving invalid requests do not escape as unhandled Zod exceptions

Fixes #4294

Tests

  • node --test apps/api/src/tests/*.test.js
  • npm test --workspace apps/api currently fails because the existing script runs node --test src/tests, which Node tries to resolve as a module directory instead of the test files

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.

Auth and job validation errors can escape as unhandled Zod exceptions

1 participant