Repository navigation
Commit 3bd7a8f
authored
fix(i18n): wrap error in loader (#1202)
## What?
Replaced the `%v` verb with `%w` in `i18n/loader.go` when returning
errors from the embedded loader.
## Why?
The current implementation stringifies the underlying `err` using `%v`,
which breaks the error chain. This prevents callers from inspecting the
root cause using `errors.Is()` or `errors.As()`. Utilizing double `%w`
(supported in Go 1.20+) ensures both `ErrLoadFailed` and the original
error remain accessible in the error tree.
Closes #10511 parent cecc8d3 commit 3bd7a8f
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
0 commit comments