Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
inkognitro committed Sep 25, 2024
1 parent c2604df commit 5d3be54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@ Anyway, React stuff is out-of-scope of this package.
### ZodValidationRequestHandler
This implementation is responsible for validating the request and response data through their Zod schemas.
This one is only available when Zod schemas are generated due to the `withZod: true` configuration.
This request handler does throw an error when requests or responses do not comply with the
zod schema definitions which are defined inside the requests' `endpointSchema` property.
This request handler does `reject` the promise with the Zod error when requests or responses do not comply with the
Zod schema definitions which are defined in the requests' `endpointSchema` property.
It uses the [safeParse](https://zod.dev/?id=safeparse) method for this task.

## Promises: `resolve` vs `reject`
Expand Down

0 comments on commit 5d3be54

Please sign in to comment.