Commit 5373cea
committed
feat: reject reserved "$" event prefix client-side
Mirrors the server-side validation added in
Flagsmith/flagsmith-analytics-pipeline@8fb51c0 — Flagsmith.track_event
raises ValueError when the event name starts with "$" and isn't a known
system event. Avoids a fire-and-forget 400 round-trip; user gets the
error at the call site.
Only applies to track_event (user-controlled name); track_exposure_event
sets the literal internally and is unaffected.1 parent f58f433 commit 5373cea
2 files changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
380 | 381 | | |
381 | 382 | | |
382 | 383 | | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
383 | 389 | | |
384 | 390 | | |
385 | 391 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
957 | 957 | | |
958 | 958 | | |
959 | 959 | | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
960 | 970 | | |
961 | 971 | | |
962 | 972 | | |
| |||
0 commit comments