Skip to content

Conversation

@ruturaj-rathod
Copy link

Fixes #579

To Resolve this used the zod schema and safe parse to check valide request body. This only reflect on the /api/chat API and not other api.

Checks:
Done: npm run format:write
Done: Unit testing using postman.
Done: Run production docker and play around the chat
Undone: handle this error on UI (No need to handle on UI side). Error reponse message handle by default

image

@ItzCrazyKns
Copy link
Owner

Hi, could you please remove the validate.ts file and move its content to the route file.

@ruturaj-rathod
Copy link
Author

hey, I observe lately that systemInstructions is send as null from UI so I revert my last change and commit again with force push.

@ItzCrazyKns ItzCrazyKns merged commit d611dda into ItzCrazyKns:master Sep 27, 2025
@ItzCrazyKns
Copy link
Owner

TYSM!

@ruturaj-rathod ruturaj-rathod deleted the fix/body-validation-579 branch September 30, 2025 06:13
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.

When passing malformed response body, backend freezes in some cases instead of returning error

2 participants