Commit 4c0eee6
committed
Improve error messages: split validation and include field name
- Split user ID validation into two distinct error cases:
1. Missing user ID (no valid targeting_key, user_id, or userId found)
2. Invalid type (user ID found but not a string)
- Include original field name in type validation error for better debugging
- Re-introduce user_id_source variable for error reporting purposes only
- Enhanced error specificity: 'targeting_key must be a string, got int' vs generic message1 parent fb2408f commit 4c0eee6
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| 115 | + | |
114 | 116 | | |
115 | 117 | | |
| 118 | + | |
116 | 119 | | |
117 | 120 | | |
| 121 | + | |
118 | 122 | | |
119 | | - | |
| 123 | + | |
120 | 124 | | |
121 | 125 | | |
122 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
123 | 132 | | |
124 | 133 | | |
125 | 134 | | |
| |||
0 commit comments