mm-ninja-turtles / turtle-express

My attempt of making Express.JS a typesafe router with Zod.
3 stars 0 forks source link

[bug]: status 400 should respond with bad request message #32

Closed wai-lin closed 2 years ago

wai-lin commented 2 years ago

Problem

When response schema and response object validation failed, 400 status is replied and message is Success. it should be Bad request or other status.

Also data should also included in response object with null value instead of undefined.

Screenshot

Screen Shot 2022-08-08 at 3 43 40 PM