diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2024-06-04 11:55:37 +0200 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2024-06-04 12:56:03 +0200 |
| commit | 4542717e1ad0001310bbb6b25328ee153e5208ad (patch) | |
| tree | b82fb555d9f4219abecf606673fa251f5e0fc7f9 /i18nerr | |
| parent | 7351042dcf9bfe2dc720489650eaf37243f78e17 (diff) | |
i18nerr: Make sure unwrapping for internal errors still work
Diffstat (limited to 'i18nerr')
| -rw-r--r-- | i18nerr/i18nerr.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/i18nerr/i18nerr.go b/i18nerr/i18nerr.go index 3e807f2..168cf84 100644 --- a/i18nerr/i18nerr.go +++ b/i18nerr/i18nerr.go @@ -150,7 +150,7 @@ func NewInternalf(disp string, args ...interface{}) *Error { // WrapInternal wraps an error and a display string into a localised internal error func WrapInternal(err error, disp string) *Error { - return NewInternal(fmt.Sprintf("%s with internal cause: %v", disp, err)) + return Wrap(fmt.Errorf("%s with internal cause: %w", disp, err), "An internal error occurred") } // WrapInternalf wraps an error and a display string with args into a localised internal error |
