-
Notifications
You must be signed in to change notification settings - Fork 116
Open
Description
Segment.Close
enriches the segment with details specific to the error passed, but since it uses type assertions, the error must be of an exact type:
aws-xray-sdk-go/strategy/exception/default_exception_formatting_strategy.go
Lines 118 to 123 in 0532644
if reqErr, ok := err.(awserr.RequestFailure); ok { | |
// A service error occurs | |
if reqErr.RequestID() != "" { | |
isRemote = true | |
} | |
} |
aws-xray-sdk-go/strategy/exception/default_exception_formatting_strategy.go
Lines 136 to 138 in 0532644
if err, ok := err.(*XRayError); ok { | |
e.Type = err.Type | |
} |
aws-xray-sdk-go/strategy/exception/default_exception_formatting_strategy.go
Lines 143 to 145 in 0532644
if err, ok := err.(StackTracer); ok { | |
s = err.StackTrace() | |
} |
Using errors.As
there instead of type assertions would make it work with wrapped errors as well.
adam-debkowski and programmer04
Metadata
Metadata
Assignees
Labels
No labels