Skip to content

How to validate transformed errors with the schema #4989

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

Open
berdyshev opened this issue May 15, 2025 · 1 comment
Open

How to validate transformed errors with the schema #4989

berdyshev opened this issue May 15, 2025 · 1 comment

Comments

@berdyshev
Copy link

What should be the errorResponseSchema when the transformErrorResponse is used?

Here is the example of my configuration and there is a type error for the errorResponseSchema however it works in the actual app (sorry, I didn't integrate the actual API into the demo app).

If I will replace it with errorResponseSchema, the TS won't complain but the schema validation will fail with the missing data property.

@EskiMojo14
Copy link
Collaborator

errorResponseSchema is for after transformation, if any. For validation before transformation, use rawErrorResponseSchema.

Annoyingly our docblocks plugin seems to be acting up, so the docs are missing the description for that property.

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

No branches or pull requests

2 participants