This repository has been archived by the owner on Jun 27, 2024. It is now read-only.
include validation errors in the response body #200
Labels
enhancement
Improves an existing feature.
functionality
A issue or pull request regarding the functionality.
Milestone
I need to be able to retrieve failed network requests that fail to pass through Zod's validation.
Right now, it seems to return default
400 BAD REQUEST
responses by default, but I prefer to know why those requests failed, so I can return that data to the browser and display alerts for all their errors, in case they manage to get through the frontend validation somehow.I'm using zod as a validation middleware before the response is sent. This is my code:
When an error happens, the response is sent before reaching the response block.
The text was updated successfully, but these errors were encountered: