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

fix: raise ValidationException when pydantic validation fails #2204

Merged
merged 3 commits into from
Aug 23, 2023

Conversation

guacs
Copy link
Member

@guacs guacs commented Aug 23, 2023

Pull Request Checklist

  • New code has 100% test coverage
  • (If applicable) The prose documentation has been updated to reflect the changes introduced by this PR
  • (If applicable) The reference documentation has been updated to reflect the changes introduced by this PR

Description

  • This PR ensures that when the pydantic validation fails in the Pydantic DTO, a ValidationException is raised with the extras set to the errors given by pydantic.

Close Issue(s)

@guacs guacs requested review from a team as code owners August 23, 2023 15:37
Copy link
Member

@provinzkraut provinzkraut left a comment

Choose a reason for hiding this comment

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

Great!

tests/unit/test_contrib/test_pydantic/test_integration.py Outdated Show resolved Hide resolved
@github-actions
Copy link

Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/2204

@provinzkraut provinzkraut merged commit 8494f33 into litestar-org:main Aug 23, 2023
16 checks passed
@guacs guacs deleted the pydantic-validation-exception branch August 24, 2023 01:23
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.

Bug: pydantic validations aren't being handled by DTOs
2 participants