Commit cd1bd55
authored
fix(usage): add missing error filtering for users/admin (#1119)
Because
- The `TriggerSingleReporter` method was missing the same error
filtering logic that exists in `NewUsage` and `StartReporter` methods
- When `GetUserAdmin` fails with "users/admin" error, it should be
treated as a debug message rather than an error since only Instill Core
CE has the default "admin" user
- Without this filtering, false alarm errors were being logged when the
admin user doesn't exist in other Instill editions
This commit
- Adds the same error filtering pattern to `TriggerSingleReporter` that
already exists in `NewUsage` and `StartReporter`
- Changes the error handling to check if the error contains
"users/admin" and treats it as a debug log instead of an error log
- Ensures consistent error handling across all three methods when
dealing with the default admin user lookup
- Prevents false alarm error logs in Instill editions that don't have
the default admin user1 parent b51c8f4 commit cd1bd55
1 file changed
+17
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
44 | | - | |
45 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
46 | 52 | | |
47 | 53 | | |
| 54 | + | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
| |||
219 | 226 | | |
220 | 227 | | |
221 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
222 | 233 | | |
223 | 234 | | |
224 | 235 | | |
| |||
243 | 254 | | |
244 | 255 | | |
245 | 256 | | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
246 | 261 | | |
247 | 262 | | |
248 | 263 | | |
| |||
0 commit comments