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

Improve error message when AbstractSerializableMixin.from_data dispatches to itself #4

Open
drhagen opened this issue May 3, 2023 · 0 comments

Comments

@drhagen
Copy link
Owner

drhagen commented May 3, 2023

AbstractSerializableMixin.from_data uses the _type attribute to look up the subclass and dispatch to its from_data. If the subclass does not have its own from_data method, then the dispatch comes right back to itself, but without the _type attribute and gives a weird error. An effort should be made to improve this error, maybe via introspection to see if the function being dispatched to is the same object as the current function.

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