Summary
Go 1.20 added another way to unwrap errors, interface { Unwrap() []error }. As far as I can see, as of now Event.SetException doesn't support it.
|
switch previous := err.(type) { |
|
case interface{ Unwrap() error }: |
|
err = previous.Unwrap() |
|
case interface{ Cause() error }: |
|
err = previous.Cause() |
|
default: |
|
err = nil |
|
} |
Motivation
Developers are updating to Go 1.20, as Go 1.19 is EOL now, and they will expect sentry-go to support the new interface and include all errors into the event data.
Additional Context
Summary
Go 1.20 added another way to unwrap errors,
interface { Unwrap() []error }. As far as I can see, as of nowEvent.SetExceptiondoesn't support it.sentry-go/interfaces.go
Lines 356 to 363 in cda691d
Motivation
Developers are updating to Go 1.20, as Go 1.19 is EOL now, and they will expect sentry-go to support the new interface and include all errors into the event data.
Additional Context