Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #122

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update README.md #122

wants to merge 1 commit into from

Conversation

Bram-dc
Copy link
Contributor

@Bram-dc Bram-dc commented Sep 30, 2024

No description provided.

@@ -152,7 +152,7 @@ import { hasZodFastifySchemaValidationErrors } from 'fastify-type-provider-zod'
fastifyApp.setErrorHandler((err, req, reply) => {
if (hasZodFastifySchemaValidationErrors(err)) {
return reply.code(400).send({
error: 'Response Validation Error',
error: 'Schema Validation Error',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't it technically be Response Schema Validation Error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it validates the request: body, params and querystring, not the response. That is ResponseSerializationError.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right. Wouldn't Request validation error be more intuitive then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also possible, but fastify calls it FastifySchemaValidationError. Both will work

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.

2 participants