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

Add way to detect unexpected values in fields #36

Open
Holzhaus opened this issue Feb 22, 2022 · 1 comment
Open

Add way to detect unexpected values in fields #36

Holzhaus opened this issue Feb 22, 2022 · 1 comment

Comments

@Holzhaus
Copy link
Owner

In the long run, it would be nice if we could have some diagnostics for the Unknown case. This would help catch edge cases of values we don't know.

We need a way to handle partial failure like this. Lots of the other unknown fields aren't arbitrary, but for example just seem to contain a static value most of the time. It would be nice to have a way of (de-)serializing them while still conveying that the contained value was differing from the expected one. This could help tremendously in helping to find databases where the usual assumptions don't apply.

One possible way to deal with this is adding a new method (e.g. checkForUnexpectedData() -> Result<(), Error>) that looks for unexpected data in fields. But that is something for another PR.

Originally posted by @Swiftb0y and @Holzhaus in #34 (comment)

@Holzhaus
Copy link
Owner Author

The Unknown enum variants have mostly been removed in #40 and #47. Not sure how relevant this still is. But we could definitely add some error context to improve debugging.

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

1 participant