From 45d4b92fc6162cd8f983213d3e83dd4db291a76f Mon Sep 17 00:00:00 2001 From: yusing Date: Thu, 26 Sep 2024 20:11:05 +0800 Subject: [PATCH] Fixed missing error subject --- src/error/error.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/error/error.go b/src/error/error.go index 1aab67b..c18386d 100644 --- a/src/error/error.go +++ b/src/error/error.go @@ -265,6 +265,8 @@ func (ne NestedError) buildError(level int, prefix string) error { for _, extra := range ne.extras { res = errors.Join(res, extra.buildError(level+1, "- ")) } + } else { + res = fmt.Errorf("%w%s", res, sb.String()) } return res }