Commit eec6203
committed
fix: add validation logging for data quality issues
1. **FaultsDashboard.tsx**: Add warning for unexpected entity types
- Explicitly handle 'component'/'components' case before fallback
- Log console.warn when unknown entity type is encountered
- Helps identify bugs where unexpected entity types are passed
- Maintains existing default behavior while improving debuggability
2. **store.ts**: Add validation for malformed function data
- Validate fn.id exists and is string or number before mapping
- Warn when both fn.name and fn.id are missing
- Prevents data quality issues from being silently masked
- Aids debugging when API returns unexpected function data structure
- Preserves existing fallback behavior ('Unknown', String(fn.id))1 parent c100eb0 commit eec6203
2 files changed
+16
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
596 | 604 | | |
597 | 605 | | |
598 | 606 | | |
| |||
0 commit comments