// Otherwise, do a DFS traversal of the error tree, ignoring wrapper errors.
for len(q) > 0 {
err = q[len(q)-1]
q = q[:len(q)-1]
errType := fmt.Sprintf("%T", err)
if !wrapperErrorTypes[errType] {
return strings.TrimPrefix(errType, "*")
}
// The error could implement zero or one of the unary or multi-error wrapper interfaces. It's impossible to
// implement both because they have the same method name. As a result, this is still deterministic.