Skip to content

Commit

Permalink
fix(web-analytics): Add more debugging when test filters do not pass …
Browse files Browse the repository at this point in the history
…validation (#19970)

* fix(web-analytics): Add more debugging when test filters do not pass validation

* Update test
  • Loading branch information
robbie-c authored Jan 26, 2024
1 parent c2631c2 commit 24c867d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion posthog/hogql/test/test_property.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_property_to_expr_group(self):
self._property_to_expr({"type": "group", "key": "a", "value": "b"})
self.assertEqual(
str(e.exception),
"Missing required key group_type_index for property type group",
"Missing required key group_type_index for property type group with name a",
)

def test_property_to_expr_event(self):
Expand Down
2 changes: 1 addition & 1 deletion posthog/models/property/property.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def __init__(

for key in VALIDATE_PROP_TYPES[self.type]:
if getattr(self, key, None) is None:
raise ValueError(f"Missing required key {key} for property type {self.type}")
raise ValueError(f"Missing required key {key} for property type {self.type} with name {self.key}")

if self.type == "behavioral":
for key in VALIDATE_BEHAVIORAL_PROP_TYPES[cast(BehavioralPropertyType, self.value)]:
Expand Down

0 comments on commit 24c867d

Please sign in to comment.