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

Consider making DecodeError and ValidationError inherit from ValueError #634

Open
vytas7 opened this issue Jan 20, 2024 · 1 comment · May be fixed by #790
Open

Consider making DecodeError and ValidationError inherit from ValueError #634

vytas7 opened this issue Jan 20, 2024 · 1 comment · May be fixed by #790

Comments

@vytas7
Copy link

vytas7 commented Jan 20, 2024

Description

In many scenarios and libraries one assumes that validation errors inherit from ValueError, however, msgspec's exception classes do not. Would it be possible to make DecodeError and ValidationError subclasses of ValueError somewhere in the hierarchy?

@vytas7 vytas7 changed the title Consider making DecodeError and ValidationError inherit from ValueError Consider making DecodeError and ValidationError inherit from ValueError Jan 20, 2024
@jcrist
Copy link
Owner

jcrist commented Jan 21, 2024

Makes sense to me, happy to make this change. This would be a breaking change of course, but since we're still in 0.* that shouldn't be unexpected.

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 a pull request may close this issue.

2 participants