This repository was archived by the owner on Jun 26, 2026. It is now read-only.
Repository navigation
Commit da6961c
committed
chore(console): tighten error narrowing and drop redundant slice
Use 'instanceof K8sApiError' to read status from the nodes-list error
instead of the previous 'as unknown as { status?: unknown }' bridge —
the runtime check is type-safe and the cast is gone. K8sApiError is
the only error shape the client throws on HTTP failures, and the
exported class is already part of the @cozystack/k8s-client public
surface.
Drop the .slice() before .sort() in the per-node table: Array.filter()
already returns a fresh array, so .slice() was a no-op safeguard. The
chained form (.filter().sort()) is what the rest of the codebase
uses when the input is known to be filter-produced.
Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>1 parent e229064 commit da6961c
2 files changed
Lines changed: 9 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
212 | 215 | | |
213 | 216 | | |
214 | 217 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
136 | | - | |
137 | | - | |
138 | | - | |
| 137 | + | |
139 | 138 | | |
140 | 139 | | |
141 | 140 | | |
| |||
0 commit comments