Skip to content

Commit

Permalink
Do not wrap error if multierror does not have one. (#3772)
Browse files Browse the repository at this point in the history
  • Loading branch information
MadVikingGod authored Feb 27, 2023
1 parent 01bbea3 commit 17e5d0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions sdk/metric/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, "; "))
}

Expand Down

0 comments on commit 17e5d0f

Please sign in to comment.