Commit 1ff428f
authored
fix(usage): add missing error filtering for users/admin (#777)
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 288cbf9 commit 1ff428f
1 file changed
+20
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
48 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
49 | 54 | | |
50 | 55 | | |
| 56 | + | |
51 | 57 | | |
52 | 58 | | |
53 | 59 | | |
| |||
211 | 217 | | |
212 | 218 | | |
213 | 219 | | |
214 | | - | |
215 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
216 | 226 | | |
217 | 227 | | |
218 | 228 | | |
| |||
234 | 244 | | |
235 | 245 | | |
236 | 246 | | |
237 | | - | |
238 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
239 | 253 | | |
240 | 254 | | |
241 | 255 | | |
| |||
0 commit comments