You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature is useful, but I have one problem.
It is that I cannot access the Ninja Schema from which the ValidationError raised.
In our use case, we want to customize error messages using Schema information.
But,ninja.errors.ValidationError cannot refer to Schema object.
Is there a way to handle these cases?
The text was updated successfully, but these errors were encountered:
@wf-yamaday I have looked at this and seen that the problem is that ValidationError is initiated by pydantic library. And I have checked if there is a way to config exception type for a pydantic schema but that doesnt exist.
Thanks for this great project!
We are using Django Ninja Extra to develop our application.
In our application, we are trying to return 400 (Bad Request) on input schema input value validation failure.
The input schema is defined using the Ninja schema (https://eadwincode.github.io/django-ninja-extra/tutorial/schema/ ).
And, define a custom error handler that overrides ValidationError.
This feature is useful, but I have one problem.
It is that I cannot access the Ninja Schema from which the ValidationError raised.
In our use case, we want to customize error messages using Schema information.
But,
ninja.errors.ValidationError
cannot refer to Schema object.Is there a way to handle these cases?
The text was updated successfully, but these errors were encountered: