You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was thinking more along the lines of a ser/de and validation library like marshmallow or pydantic. Especially leaning towards the latter, since it works with data classes and type hints.
I just ran into this. A static analyser is indeed insufficient. We should probably also make the error make it clear that this is caused by an issue with the template
Yeah, it's rather annoying. The service can also do a bit more validation before calling the handler, too. But it would be good to have in any case, e.g. if a payload structure is changed in future. There's a few other things on my plate, but I've made progress using pydantic on this.
Might be good to validate incoming payloads, so that they don't break the code in weird ways if they don't conform to what we expect.