1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-09-16 09:26:25 +02:00

Do not wrap error if multierror does not have one. (#3772)

This commit is contained in:
Aaron Clawson
2023-02-27 09:10:55 -06:00
committed by GitHub
parent 01bbea3285
commit 17e5d0f549
2 changed files with 4 additions and 0 deletions

View File

@@ -49,6 +49,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Remove use of deprecated `"math/rand".Seed` in `go.opentelemetry.io/otel/example/prometheus`. (#3733)
- Do not silently drop unknown schema data with `Parse` in `go.opentelemetry.io/otel/schema/v1.1`. (#3743)
- Data race issue in OTLP exporter retry mechanism. (#3756)
- Fixes wrapping a nil error in some cases (#????)
## [1.13.0/0.36.0] 2023-02-07

View File

@@ -551,6 +551,9 @@ func (m *multierror) errorOrNil() error {
if len(m.errors) == 0 {
return nil
}
if m.wrapped == nil {
return errors.New(strings.Join(m.errors, "; "))
}
return fmt.Errorf("%w: %s", m.wrapped, strings.Join(m.errors, "; "))
}