Commit bdbe2a7
authored
fix(controller): wrap secret fetch errors with %w to preserve error chain (#1772)
`ReconcileKagentModelConfig` appends secret fetch errors via
`multierror.Append`, but both `fmt.Errorf` calls used `%v` instead of
`%w`. This means the original Kubernetes API error is stringified and
lost — `errors.Is` and `errors.As` cannot unwrap through the multi-error
to inspect the root cause (e.g. `apierrors.IsNotFound`).
Switching to `%w` keeps the error chain intact so callers can inspect or
match the underlying error type.
Two lines changed, no behaviour change in the happy path.
Signed-off-by: mesutoezdil <mesudozdil@gmail.com>1 parent b50661f commit bdbe2a7
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
395 | | - | |
| 395 | + | |
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| |||
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
410 | | - | |
| 410 | + | |
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
| |||
0 commit comments