Fixed missing error subject

This commit is contained in:
yusing 2024-09-26 20:11:05 +08:00
parent 72df9ff3e4
commit 45d4b92fc6

View file

@ -265,6 +265,8 @@ func (ne NestedError) buildError(level int, prefix string) error {
for _, extra := range ne.extras { for _, extra := range ne.extras {
res = errors.Join(res, extra.buildError(level+1, "- ")) res = errors.Join(res, extra.buildError(level+1, "- "))
} }
} else {
res = fmt.Errorf("%w%s", res, sb.String())
} }
return res return res
} }