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

Provide more informative error for dynamic.dict when value fails #746

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sporto
Copy link
Contributor

@sporto sporto commented Nov 20, 2024

#740
Something like this perhaps?

@lpil you mentioned that the module already defines logic for turning any value into a string for use in the error path.
Which function is that?

Thanks

Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

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

Check out what push_path does! That has what we want.

@sporto
Copy link
Contributor Author

sporto commented Nov 21, 2024

@lpil PR updated

@sporto sporto changed the title Provide more informative error for dynamic.dict when key is a string Provide more informative error for dynamic.dict when value fails Nov 21, 2024
@lpil
Copy link
Member

lpil commented Dec 23, 2024

It's still not using the wrong format I'm afraid. Check out push_path and how that works with field.

You may also want to look at the new decoder API now too

@sporto
Copy link
Contributor Author

sporto commented Jan 3, 2025

Hello, I'm afraid I don't follow. This is using the code from push_path. Could you please clarify what format you expect to see? Otherwise, I think I'm just guessing.

@lpil
Copy link
Member

lpil commented Jan 3, 2025

Don't add a new syntax to push_path in any way, just use the string! You can use field and push_path as a reference. See how neither uses C style angle brackets in the path.

Note this code is now going to be deprecated very soon.

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.

2 participants