notifiers
notifiers copied to clipboard
Add schema path to json validation exception messages
Currently if you have a json object like this:
'personalizations': [
{
'to': [
{
'email': '[email protected]',
'name': 'someone'
},
{
'name': 'someone'
}
]
}
]
}
in a schema where each 'to' object needs an 'email' variable, the validation error message will read: Error with sent data: 'email' is a required property
This is difficult to track down in large arrays, and can also be confusing when variable names are reused at different levels of nesting.
It would be better if the message read something like: Error with sent data: 'personalizations.to.1.email' is a required property
Thanks for opening your first issue here! Be sure to follow the issue template! 👋🐞👋
This will be addressed when switching to pydantic via #221